Пример #1
0
 def __init__(self, parent, title, defaultvalue, defaultchkvalue):
     wx.Dialog.__init__(self, parent, -1, style = wx.DEFAULT_DIALOG_STYLE, title = title)
     
     self.pref = Globals.pref
     
     self.sizer = sizer = ui.VBox(namebinding='widget').create(self).auto_layout()
     box = sizer.add(ui.VGroup(tr('Python interpreter')))
     h = box.add(ui.HBox())
     h.add(ui.Label(tr('Select:')))
     
     interpreters = dict(self.pref.python_interpreter)
     default_interpreter = self.pref.default_interpreter
     if not default_interpreter in interpreters:
         default_interpreter = self.pref.python_interpreter[0][0]
     
     h.add(ui.SingleChoice(default_interpreter, sorted(interpreters.keys())), name='interpreter').bind(wx.EVT_COMBOBOX, self.OnChanged)
     h.add(ui.Label(tr('Parameters:')))
     h.add(ui.Text(self.pref.python_default_paramters.get(default_interpreter, '')), name='parameter')
     
     h = self.sizer.add(ui.HBox())
     h.add(ui.Label(tr('Parameters of script:')))
     h.add(ui.Text(defaultvalue), name='command_line').tooltip("$file will be replaced with the filename of the current document\n"
         "$path will be replaced with the filename's directory of the current document")
     self.sizer.add(ui.Check(defaultchkvalue, tr('Redirect input and output')), name='redirect')
     self.sizer.add(ui.Check(self.pref.python_show_args, tr('Show the Select Arguments dialog at Python program run')), name='show_args')
     
     sizer.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER|wx.BOTTOM)
     self.sizer.bind('btnOk', 'click', self.OnOK)
     self.btnOk.SetDefault()
     
     sizer.auto_fit(1)
Пример #2
0
    def __init__(self, title=tr('Wrap Text'), values=None):
        wx.Dialog.__init__(self,
                           Globals.mainframe,
                           -1,
                           style=wx.DEFAULT_DIALOG_STYLE,
                           title=title,
                           size=(600, 300))

        self.sizer = box = ui.VBox(
            namebinding='widget').create(self).auto_layout()
        grid = box.add(ui.SimpleGrid)
        grid.add(tr('Width'), ui.Int(75), name='width')
        grid.add(tr('Indent'), ui.Text(''), name='indent')
        grid.add(tr('First Line Indent'), ui.Text(''), name='firstindent')
        grid.add(tr('Skip Beginning Characters'), ui.Text(''), name='skipchar')
        grid.add(tr('Remove Tailing Characters'),
                 ui.Text(''),
                 name='remove_tailingchar')
        grid.add(tr('Add Tailing Characters'),
                 ui.Text(''),
                 name='add_tailingchar')
        box.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER | wx.BOTTOM)

        box.auto_fit(2)

        if values:
            box.SetValue(values)
Пример #3
0
 def __init__(self, parent):
     wx.Dialog.__init__(self, parent, -1, title=tr('Input Log Message'), size=(300, 200))
     self.sizer = sizer = ui.VBox(namebinding='widget').create(self).auto_layout()
     sizer.add(ui.MultiText, name='text')
     
     sizer.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER|wx.BOTTOM)
     sizer.auto_fit(0)
     
     self.CentreOnParent()
Пример #4
0
    def __init__(self,
                 parent,
                 size=(850, 500),
                 style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER):
        self.initmixin()

        #config.ini
        self.ini = common.get_config_file_obj()

        wx.Dialog.__init__(self,
                           parent,
                           -1,
                           title=tr("Preferences"),
                           size=size,
                           style=style)

        self.value_set = []
        self.pages = {}
        self.pagenames = {}
        self.values = {}

        self.parent = parent
        self.pref = self.parent.pref
        self.default_pref = Preference.Preference()

        self.box = box = ui.VBox(namebinding='widget')
        self.treebook = TreeBookPanel(self, -1)
        self.addPages(self.treebook)

        box.add(self.treebook, proportion=1, flag=wx.EXPAND | wx.ALL)

        box.add(wx.StaticLine(self), flag=wx.EXPAND | wx.ALL)

        buttons = [(tr('OK'), wx.ID_OK, 'btnOk'),
                   (tr('Cancel'), wx.ID_CANCEL, 'btnCancel'),
                   (tr('Apply'), wx.ID_APPLY, 'btnApply')]
        box.add(ui.simple_buttons(buttons), flag=wx.ALIGN_CENTER | wx.BOTTOM)
        box.bind('btnOk', 'click', self.OnOk)
        box.bind('btnApply', 'click', self.OnApply)

        self.create_pages()

        self.callplugin('initpreference', self)
        ui.create(self, box, 0)
        self.btnOk.SetDefault()

        self.treebook.select()
        self.values = self.get_values()

        wx.EVT_UPDATE_UI(self, self.btnApply.GetId(), self.OnUpdateApply)

        self.callplugin('aftercreate', self)
Пример #5
0
    def __init__(self, parent, ftpname, user, password):
        wx.Dialog.__init__(self, parent, -1, style = wx.DEFAULT_DIALOG_STYLE, title = tr("FTP site: %s") % ftpname,size=(200, 50))

        self.sizer = box = ui.SimpleGrid(namebinding='widget').create(self).auto_layout()
        box.add(tr('Username:'******'txtUser')
        box.add(tr('Password:'******'txtPassword')

        box.add('', ui.simple_buttons(), flag=wx.ALIGN_CENTER|wx.BOTTOM, span=True)
        self.btnOk.SetDefault()
        
        box.auto_fit(2)
        
        box.bind('btnOk', wx.EVT_UPDATE_UI, self.OnUpdateUI)
Пример #6
0
    def __init__(self, parent, title, username, may_save):
        wx.Dialog.__init__(self, parent, -1, title, size=(300, -1))

        self.sizer = sizer = ui.VBox(namebinding='widget').create(self).auto_layout()
        box = sizer.add(ui.VGroup(tr('Credentials')))
        box1 = box.add(ui.SimpleGrid)
        box1.add(tr('Username:'******'username')
        box1.add(tr('Password:'******'password')
        sizer.add(ui.Check(may_save, tr('Always uses these credentials')), name='save')
        
        sizer.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER|wx.BOTTOM)
        sizer.auto_fit(1)
        
        self.CentreOnParent()
Пример #7
0
    def __init__(self, parent, realm, info_list, may_save):
        wx.Dialog.__init__( self, parent, -1, tr('Trust server %s') % realm )

        self.sizer = sizer = ui.VBox(namebinding='widget').create(self).auto_layout()
        box = sizer.add(ui.VGroup(tr('Server Certificate')))
        box1 = box.add(ui.SimpleGrid)
        for key, value in info_list:
            box1.add(key, ui.Text(value, style=wx.TE_READONLY))
         
        sizer.add(ui.Check(may_save, tr("Always trust this server")), name='save')

        sizer.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER|wx.BOTTOM)
        sizer.auto_fit(1)

        self.CentreOnParent()
Пример #8
0
 def __init__(self, title=tr('Wrap Text'), values=None):
     wx.Dialog.__init__(self, Globals.mainframe, -1, style = wx.DEFAULT_DIALOG_STYLE, title = title, size=(600, 300))
     
     self.sizer = box = ui.VBox(namebinding='widget').create(self).auto_layout()
     grid = box.add(ui.SimpleGrid)
     grid.add(tr('Width'), ui.Int(75), name='width')
     grid.add(tr('Indent'), ui.Text(''), name='indent')
     grid.add(tr('First Line Indent'), ui.Text(''), name='firstindent')
     grid.add(tr('Skip Beginning Characters'), ui.Text(''), name='skipchar')
     box.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER|wx.BOTTOM)
     
     box.auto_fit(2)
     
     if values:
         box.SetValue(values)
Пример #9
0
    def __init__(self, parent, title, defaultvalue, defaultchkvalue):
        wx.Dialog.__init__(self,
                           parent,
                           -1,
                           style=wx.DEFAULT_DIALOG_STYLE,
                           title=title)

        self.pref = Globals.pref

        self.sizer = sizer = ui.VBox(
            namebinding='widget').create(self).auto_layout()
        box = sizer.add(ui.VGroup(tr('Lua interpreter')))
        h = box.add(ui.HBox())
        h.add(ui.Label(tr('Select:')))

        interpreters = dict(self.pref.lua_interpreter)
        default_lua_interpreter = self.pref.default_lua_interpreter
        if not default_lua_interpreter in interpreters:
            default_lua_interpreter = self.pref.default_lua_interpreter[0][0]

        h.add(ui.SingleChoice(default_lua_interpreter,
                              sorted(interpreters.keys())),
              name='interpreter').bind(wx.EVT_COMBOBOX, self.OnChanged)
        h.add(ui.Label(tr('Parameters:')))
        h.add(ui.Text(
            self.pref.lua_default_paramters.get(default_lua_interpreter, '')),
              name='parameter')

        h = self.sizer.add(ui.HBox())
        h.add(ui.Label(tr('Parameters of script:')))
        h.add(ui.Text(defaultvalue), name='command_line').tooltip(
            "$file will be replaced with the filename of the current document\n"
            "$path will be replaced with the filename's directory of the current document"
        )
        self.sizer.add(ui.Check(defaultchkvalue,
                                tr('Redirect input and output')),
                       name='redirect')
        self.sizer.add(ui.Check(
            self.pref.lua_show_args,
            tr('Show the Select Arguments dialog at Lua program run')),
                       name='show_args')

        sizer.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER | wx.BOTTOM)
        self.sizer.bind('btnOk', 'click', self.OnOK)
        self.btnOk.SetDefault()

        sizer.auto_fit(1)
Пример #10
0
 def __init__(self, parent, id=-1, title=tr('Property'), size=(400, 300), values=None):
     wx.Dialog.__init__(self, parent, id, title=title, size=size)
     
     self.sizer = ui.VBox(namebinding='widget').create(self).auto_layout()
     grid = self.sizer.add(ui.SimpleGrid)
     grid.add(tr('Title'), ui.Text, name='title')
     grid.add(tr('Author'), ui.Text, name='author')
     grid.add(tr('Version'), ui.Text, name='version')
     grid.add(tr('Date'), ui.Date, name='date')
     grid.add(tr('Description'), ui.MultiText('', size=(-1, 60)), name='description', span=True)
     
     self.sizer.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER|wx.BOTTOM)
     self.btnOk.SetDefault()
     
     if values:
         self.sizer.SetValue(values)
     self.sizer.auto_fit(1)
Пример #11
0
 def __init__(self, title=tr('Select Encoding'), style = wx.DEFAULT_DIALOG_STYLE):
     wx.Dialog.__init__(self, Globals.mainframe, -1, title=title, style = style)
     
     self.sizer = box = ui.VBox(namebinding='widget').create(self).auto_layout()
     grid = box.add(ui.Grid)
     grid.add((0, 0), ui.Radio(label=tr('Encoding:')), name='rdo_encoding').bind(wx.EVT_RADIOBUTTON, self.OnRadio)
     grid.add((0, 1), ui.SingleChoice(None, self.EncodingList), name='encoding')
     grid.add((1, 0), ui.Radio(label=tr('Custom Encoding:')), name='rdo_cus_encoding').bind(wx.EVT_RADIOBUTTON, self.OnRadio)
     grid.add((1, 1), ui.Text, name='cus_encoding')
     
     self.encoding.Enable(True)
     self.cus_encoding.Enable(False)
     
     box.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER|wx.BOTTOM)
     self.btnOk.SetDefault()
     
     box.auto_fit(2)
Пример #12
0
 def __init__(self, parent, title=tr('Result')):
     wx.Dialog.__init__(self, Globals.mainframe, -1, style = wx.DEFAULT_DIALOG_STYLE, title = title, size=(600, 300))
     
     self.parent = parent
     self.sizer = box = ui.VBox(namebinding='widget').create(self).auto_layout()
     self.list = CheckList.List(self, columns=[
             (tr("Action"), 120, 'left'),
             (tr("Path"), 400, 'left'),
             ], style=wx.LC_REPORT | wx.SUNKEN_BORDER)
     
     box.add(self.list, proportion=1, flag=wx.ALL|wx.EXPAND, border=5)
     box.add(ui.Label, name='message')
     box.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER|wx.BOTTOM)
     
     box.bind('btnCancel', 'click', self.OnCancel)
     box.auto_fit(0)
     self.btnOk.Disable()
     self.btnCancel.Enable()
Пример #13
0
    def __init__(self, parent, size=(850, 500), style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER):
        self.initmixin()

        #config.ini
        self.ini = common.get_config_file_obj()
        
        wx.Dialog.__init__(self, parent, -1, title=tr("Preferences"), size=size, style=style)

        self.value_set = []
        self.pages = {}
        self.pagenames = {}
        self.values = {}

        self.parent = parent
        self.pref = self.parent.pref
        self.default_pref = Preference.Preference()
        
        self.box = box = ui.VBox(namebinding='widget')
        self.treebook = TreeBookPanel(self, -1)
        self.addPages(self.treebook)
        
        box.add(self.treebook, proportion=1, flag=wx.EXPAND|wx.ALL)

        box.add(wx.StaticLine(self), flag=wx.EXPAND|wx.ALL)
        
        buttons = [(tr('OK'), wx.ID_OK, 'btnOk'), 
            (tr('Cancel'), wx.ID_CANCEL, 'btnCancel'),
            (tr('Apply'), wx.ID_APPLY, 'btnApply')]
        box.add(ui.simple_buttons(buttons), flag=wx.ALIGN_CENTER|wx.BOTTOM)
        box.bind('btnOk', 'click', self.OnOk)
        box.bind('btnApply', 'click', self.OnApply)
        
        self.create_pages()
        
        self.callplugin('initpreference', self)
        ui.create(self, box, 0)
        self.btnOk.SetDefault()
        
        self.treebook.select()
        self.values = self.get_values()
        
        wx.EVT_UPDATE_UI(self, self.btnApply.GetId(), self.OnUpdateApply)

        self.callplugin('aftercreate', self)
Пример #14
0
 def __init__(self, parent, title, path):
     wx.Dialog.__init__(self, parent, -1, style = wx.DEFAULT_DIALOG_STYLE, title = title, size=(400, 300))
     self.path = path
     
     self.sizer = box = ui.VBox(namebinding='widget').create(self).auto_layout()
     self.list = CheckList.CheckList(self, columns=[
             (tr("File"), 380, 'left'),
             ], style=wx.LC_REPORT | wx.SUNKEN_BORDER)
     
     box.add(self.list, proportion=1, flag=wx.ALL|wx.EXPAND, border=5)
     self.list.on_check = self.OnCheck
     
     #add selection switch checkbox
     box.add(ui.Check3D(2, tr('Select / deselect All')), name='select').bind('check', self.OnSelect)
     
     box.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER|wx.BOTTOM)
     self.btnOk.SetDefault()
     
     self.init()
Пример #15
0
 def __init__(self, title=tr('Checkout'), size=(450, -1)):
     wx.Dialog.__init__(self, Globals.mainframe, -1, title=title, size=size)
     
     self.pref = Globals.pref
     self.sizer = sizer = ui.VBox(namebinding='widget').create(self).auto_layout()
     box = sizer.add(ui.VGroup(tr('Repository')))
     box.add(ui.Label(tr('URL of repository:')))
     box.add(ui.ComboBox('', self.pref.svn_urls), name='url')
     box.add(ui.Label(tr('Checkout Directory')))
     box.add(ui.Dir(self.pref.svn_checkout_folder), name='dir')
     
     box = sizer.add(ui.VGroup(tr('Revision')))
     box1 = box.add(ui.HBox)
     box1.add(ui.Check(False, tr('Revision'), name='chk_revision')).bind('check', self.OnCheck)
     box1.add(ui.Text('', size=(80, -1)), name='revision').get_widget().Disable()
     
     sizer.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER|wx.BOTTOM)
     sizer.bind('btnOk', 'click', self.OnOk)
     self.btnOk.SetDefault()
     
     sizer.auto_fit(1)
    def __init__(self, title=tr("Checkout"), size=(450, -1)):
        wx.Dialog.__init__(self, Globals.mainframe, -1, title=title, size=size)

        self.pref = Globals.pref
        self.sizer = sizer = ui.VBox(namebinding="widget").create(self).auto_layout()
        box = sizer.add(ui.VGroup(tr("Repository")))
        box.add(ui.Label(tr("URL of repository:")))
        box.add(ui.ComboBox("", self.pref.svn_urls), name="url")
        box.add(ui.Label(tr("Checkout Directory")))
        box.add(ui.Dir(self.pref.svn_checkout_folder), name="dir")

        box = sizer.add(ui.VGroup(tr("Revision")))
        box1 = box.add(ui.HBox)
        box1.add(ui.Check(False, tr("Revision"), name="chk_revision")).bind("check", self.OnCheck)
        box1.add(ui.Text("", size=(80, -1)), name="revision").get_widget().Disable()

        sizer.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER | wx.BOTTOM)
        sizer.bind("btnOk", "click", self.OnOk)
        self.btnOk.SetDefault()

        sizer.auto_fit(1)
Пример #17
0
    def __init__(self, parent, title=tr('SVN Settings'), size=(450, -1)):
        self.pref = Globals.pref
        try:
            v = self._get_info()
        except:
            raise

        wx.Dialog.__init__(self, parent, -1, title=title, size=size)

        self.sizer = sizer = ui.VBox(
            namebinding='widget').create(self).auto_layout()
        box = sizer.add(ui.SimpleGrid)
        box.add(tr('Global ignores'), ui.Text, name='svn_global_ignores')\
            .tooltip(tr('Multiple ignores should be delimeted by space'))

        sizer.add(ui.Check(False, tr('Enable proxy server')), name='proxy')\
            .bind('check', self.OnEnable)
        box = sizer.add(ui.VGroup(tr('Proxy settings')))
        grid = box.add(ui.Grid(growablecol=1))

        grid.add((0, 0), ui.Label(tr('Server Address') + ':'))
        grid.add((0, 1), ui.Text, name='server')
        grid.add((0, 2), ui.Label(tr('Port') + ':'))
        grid.add((0, 3), ui.Int(0, size=(40, -1)), name='port')
        grid.add((1, 0), ui.Label(tr('Username') + ':'))
        grid.add((1, 1), ui.Text, name='username')
        grid.add((2, 0), ui.Label(tr('Password') + ':'))
        grid.add((2, 1), ui.Password, name='password')
        grid.add((3, 0), ui.Label(tr('Proxy timeout in seconds') + ':'))
        grid.add((3, 1), ui.Int, name='timeout')

        sizer.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER | wx.BOTTOM)
        sizer.bind('btnOk', 'click', self.OnOk)
        self.btnOk.SetDefault()

        sizer.auto_fit(1)

        sizer.SetValue(v)
        self.OnEnable(None)
Пример #18
0
    def __init__(self, parent, ftpname, user, password):
        wx.Dialog.__init__(self,
                           parent,
                           -1,
                           style=wx.DEFAULT_DIALOG_STYLE,
                           title=tr("FTP site: %s") % ftpname,
                           size=(200, 50))

        self.sizer = box = ui.SimpleGrid(
            namebinding='widget').create(self).auto_layout()
        box.add(tr('Username:'******'txtUser')
        box.add(tr('Password:'******'txtPassword')

        box.add('',
                ui.simple_buttons(),
                flag=wx.ALIGN_CENTER | wx.BOTTOM,
                span=True)
        self.btnOk.SetDefault()

        box.auto_fit(2)

        box.bind('btnOk', wx.EVT_UPDATE_UI, self.OnUpdateUI)
Пример #19
0
    def __init__(self, parent, title=tr('SVN Settings'), size=(450, -1)):
        self.pref = Globals.pref
        try:
            v = self._get_info()
        except:
            raise
        
        wx.Dialog.__init__(self, parent, -1, title=title, size=size)
        
        self.sizer = sizer = ui.VBox(namebinding='widget').create(self).auto_layout()
        box = sizer.add(ui.SimpleGrid)
        box.add(tr('Global ignores'), ui.Text, name='svn_global_ignores')\
            .tooltip(tr('Multiple ignores should be delimeted by space'))
        
        sizer.add(ui.Check(False, tr('Enable proxy server')), name='proxy')\
            .bind('check', self.OnEnable)
        box = sizer.add(ui.VGroup(tr('Proxy settings')))
        grid = box.add(ui.Grid(growablecol=1))
        
        grid.add((0, 0), ui.Label(tr('Server Address')+':'))
        grid.add((0, 1), ui.Text, name='server')
        grid.add((0, 2), ui.Label(tr('Port')+':'))
        grid.add((0, 3), ui.Int(0, size=(40, -1)), name='port')
        grid.add((1, 0), ui.Label(tr('Username')+':'))
        grid.add((1, 1), ui.Text, name='username')
        grid.add((2, 0), ui.Label(tr('Password')+':'))
        grid.add((2, 1), ui.Password, name='password')
        grid.add((3, 0), ui.Label(tr('Proxy timeout in seconds')+':'))
        grid.add((3, 1), ui.Int, name='timeout')
        
        sizer.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER|wx.BOTTOM)
        sizer.bind('btnOk', 'click', self.OnOk)
        self.btnOk.SetDefault()
        
        sizer.auto_fit(1)

        sizer.SetValue(v)
        self.OnEnable(None)
Пример #20
0
    def __init__(self, title=tr('Checkout'), size=(450, -1)):
        wx.Dialog.__init__(self, Globals.mainframe, -1, title=title, size=size)

        self.pref = Globals.pref
        self.sizer = sizer = ui.VBox(
            namebinding='widget').create(self).auto_layout()
        box = sizer.add(ui.VGroup(tr('Repository')))
        box.add(ui.Label(tr('URL of repository:')))
        box.add(ui.ComboBox('', self.pref.svn_urls), name='url')
        box.add(ui.Label(tr('Checkout Directory')))
        box.add(ui.Dir(self.pref.svn_checkout_folder), name='dir')

        box = sizer.add(ui.VGroup(tr('Revision')))
        box1 = box.add(ui.HBox)
        box1.add(ui.Check(False, tr('Revision'),
                          name='chk_revision')).bind('check', self.OnCheck)
        box1.add(ui.Text('', size=(80, -1)),
                 name='revision').get_widget().Disable()

        sizer.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER | wx.BOTTOM)
        sizer.bind('btnOk', 'click', self.OnOk)
        self.btnOk.SetDefault()

        sizer.auto_fit(1)
Пример #21
0
    def __init__(self, title, path):
        wx.Dialog.__init__(self, Globals.mainframe, -1, style = wx.DEFAULT_DIALOG_STYLE, title = title, size=(600, 500))
        self.pref = Globals.pref
        self.path = path
        self.fileinfos = {}
        self.filelist = []
        
        self.sizer = box = ui.VBox(namebinding='widget').create(self).auto_layout()
        
        box1 = box.add(ui.VGroup(tr("Message")))
        box1.add(ui.Button(tr("Recent Messages"))).bind('click', self.OnHisMsg)
        box1.add(ui.MultiText, name='message')

        #add filenames list
        self.list = CheckList.CheckList(self, columns=[
                (tr("File"), 390, 'left'),
                (tr("Extension"), 70, 'left'),
                (tr("Status"), 100, 'left'),
                ], style=wx.LC_REPORT | wx.SUNKEN_BORDER)
        
        box.add(self.list, proportion=2, flag=wx.EXPAND|wx.ALL, border=5)
        self.list.on_check = self.OnCheck
        
        box.add(
            ui.Check(True, tr('Show unversioned files')), 
            name='chkShowUnVersion').bind('check', self.OnShowUnVersion)
        box.add(
            ui.Check3D(False, tr('Select / deselect All')),
            name='select').bind('check', self.OnSelect)
        
        box.add(ui.simple_buttons(), flag=wx.ALIGN_CENTER|wx.BOTTOM)
        self.btnOk.SetDefault()
        
        box.auto_fit(0)
        
        wx.CallAfter(self.init)