def __init__(self, parentPage = None, *args, **kwds): """ parentPage - родительская страница (используется, если страницу нужно создавать, а не изменять) """ kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.THICK_FRAME wx.Dialog.__init__(self, *args, **kwds) # Используется для редактирования существующей страницы self.currentPage = None self.config = PageDialogConfig (Application.config) self.notebook = wx.Notebook (self, -1) self.generalPanel = GeneralPanel (self.notebook) self.iconPanel = IconPanel (self.notebook) self.appearancePanel = AppearancePanel (self.notebook) self.notebook.AddPage (self.generalPanel, _("General")) self.notebook.AddPage (self.iconPanel, _("Icon")) self.notebook.AddPage (self.appearancePanel, _("Appearance")) self.__set_properties() self.__do_layout() self.parentPage = parentPage self._fillComboType() self._setTagsList() self.generalPanel.titleTextCtrl.SetFocus() self._stylesList = StylesList (getStylesDirList ()) self.Center(wx.CENTRE_ON_SCREEN)
def __init__ (self, parent): super (AddStyleDialog, self).__init__ (parent, style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) self.__stylesList = StylesList (getStylesDirList ()) self.SetMinSize ((300, 80)) self.__createGui() self.Center(wx.CENTRE_ON_SCREEN)
def __init__(self, parent): super(AddStyleDialog, self).__init__(parent, style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) self.__stylesList = StylesList(getStylesDirList()) self.SetMinSize((300, 80)) self.__createGui() self.Center(wx.CENTRE_ON_SCREEN)
def _initStyleList(self, currentPage): self._stylesList = StylesList(getStylesDirList()) self._fillStyleCombo(self._stylesList, currentPage)