def __init_sizers(self): self.mainSizer = wx.BoxSizer(orient=wx.VERTICAL) self.buttons = wx.BoxSizer(orient=wx.HORIZONTAL) self.__init_mainsizer_items(self.mainSizer) self.__init_buttons_items(self.buttons) utils.set_min_size(self, ignoreClasses=( wx.TextCtrl, wx.Button, wx.Choice, wx.SpinCtrl, wx.FilePickerCtrl, wx.DirPickerCtrl, wx.ColourPickerCtrl)) self.SetSizerAndFit(self.mainSizer)
def __init_sizers(self): self.mainSizer = wx.BoxSizer(orient=wx.VERTICAL) self.buttons = wx.BoxSizer(orient=wx.HORIZONTAL) self.__init_mainsizer_items(self.mainSizer) self.__init_buttons_items(self.buttons) utils.set_min_size(self, ignoreClasses=(wx.TextCtrl, wx.Button, wx.Choice, wx.SpinCtrl, wx.FilePickerCtrl, wx.DirPickerCtrl, wx.ColourPickerCtrl)) self.SetSizerAndFit(self.mainSizer)
def correct_path_type(self, event): path = self.directoryText.GetValue() pattern, replacement = self.fix_separator() # warn if re.search(pattern, path): err = _(u"Incorrect path separator") self.staticText3.SetLabel(_(u"%s - press ENTER to fix") % err) utils.set_min_size(self.staticText3, 0) self.directoryText.SetBackgroundColour(u"#FDEB22") self.directoryText.Refresh() self.staticText3.Show(True) # apply else: main.show_preview(event)
def __init__(self, parent, MainWindow): global main main = MainWindow self.__init_ctrls(parent) utils.set_min_size(self, ignoreClasses=(wx.TextCtrl, wx.SpinCtrl)) self.on_config_load()