def __init__(self, parent): MyWizPage.__init__(self, parent) vb = wm.vbox() l = wm.label( self, """Set the server parameters. Make sure to set a port number\nthat is not already in use.""" ) vb.add(l, 0) hb = wm.hbox() l = wm.label(self, 'Address:') hb.add(l, 0) s = wm.string(self, '127.0.0.1') hb.add(s, 5) self.s_addr = s l = wm.label(self, 'Port:') hb.add(l, 0) s = wm.string(self, '8000') hb.add(s, 5) self.s_port = s vb.add(hb, 0) self.SetSizer(vb)
def __init__(self, parent): MyWizPage.__init__(self, parent) vb = wm.vbox() l = wm.label(self, """Pick a name for your wiki SQLite file.""") vb.add(l, 0) hb = wm.hbox() l = wm.label(self, 'Filename:') hb.add(l, 0) s = wm.string(self, 'wiki.db') hb.add(s, 5) self.s_filename = s vb.add(hb, 0) l = wm.label( self, "Your wiki will be stored in as a single SQLite database file.\nThis file will be stored in your wiki folder." ) fn = l.GetFont() fn.SetStyle(wx.FONTSTYLE_SLANT) l.SetFont(fn) vb.add(l, 0) self.SetSizer(vb)
def __init__(self, parent): MyWizPage.__init__(self, parent) vb = wm.vbox() l = wm.label( self, """Choose a location to store your wiki. I recommend\ncreating a new folder, or picking an empty folder here.""" ) vb.add(l, 0) hb = wm.hbox() l = wm.label(self, 'Folder:') hb.add(l, 0) s = wm.string(self, '') hb.add(s, 5) self.s_rootdir = s b = wm.button(self, 'Browse ...', self.on_browse) hb.add(b, 2) vb.add(hb, 0) self.SetSizer(vb) self.Bind(wiz.EVT_WIZARD_PAGE_CHANGING, self.on_changing)
def __init__(self, parent): wx.Dialog.__init__(self, parent, -1, "Wiki Configuration") vb = wm.vbox() hb = wm.hbox() l = wm.label(self, 'Location:') hb.add(l,0) s = wm.string(self, '') hb.add(s, 5) self.s_rootdir = s b = wm.button(self, 'Browse ...', self.on_choose_rootdir) hb.add(b, 2) self.b_browse_rootdir = b vb.add(hb,1) hb = wm.hbox() l = wm.label(self, 'Storage format:') hb.add(l,0) self.l_format = l cb = wm.combo(self, ['Text (.txt) files', 'TiddlyWiki (.html) file', 'SQLite database'], self.on_choose_format) hb.add(cb,1) self.cb_format = cb vb.add(hb,1) hb = wm.hbox() l = wm.label(self, 'Filename:') hb.add(l,0) self.l_filename = l s = wm.string(self, '') hb.add(s, 5) self.s_filename = s b = wm.button(self, 'Browse ...') hb.add(b, 2) self.b_browse_file = b vb.add(hb,1) hb = wm.hbox() l = wm.label(self, 'Server address:') hb.add(l,0) self.l_server_addr = l s = wm.string(self, '127.0.0.1') hb.add(s, 5) self.s_server_addr = s l = wm.label(self, 'Port:') hb.add(l,0) self.l_server_port = l s = wm.string(self, '8000') hb.add(s, 5) self.s_server_port = s vb.add(hb,1) hb = wm.hbox() b = wm.button(self,'Save',self.on_save) hb.add(b,1) b = wm.button(self, 'Cancel',self.on_cancel) hb.add(b,1) b = wm.button(self, 'Help') hb.add(b,1) vb.add(hb,1) self.SetSizer(vb) vb.SetSizeHints(self) self.SetAutoLayout(True) wx.CallAfter(self.update_enables)
def __init__(self, parent): wx.Dialog.__init__(self, parent, -1, "Wiki Configuration") vb = wm.vbox() hb = wm.hbox() l = wm.label(self, 'Location:') hb.add(l, 0) s = wm.string(self, '') hb.add(s, 5) self.s_rootdir = s b = wm.button(self, 'Browse ...', self.on_choose_rootdir) hb.add(b, 2) self.b_browse_rootdir = b vb.add(hb, 1) hb = wm.hbox() l = wm.label(self, 'Storage format:') hb.add(l, 0) self.l_format = l cb = wm.combo(self, [ 'Text (.txt) files', 'TiddlyWiki (.html) file', 'SQLite database' ], self.on_choose_format) hb.add(cb, 1) self.cb_format = cb vb.add(hb, 1) hb = wm.hbox() l = wm.label(self, 'Filename:') hb.add(l, 0) self.l_filename = l s = wm.string(self, '') hb.add(s, 5) self.s_filename = s b = wm.button(self, 'Browse ...') hb.add(b, 2) self.b_browse_file = b vb.add(hb, 1) hb = wm.hbox() l = wm.label(self, 'Server address:') hb.add(l, 0) self.l_server_addr = l s = wm.string(self, '127.0.0.1') hb.add(s, 5) self.s_server_addr = s l = wm.label(self, 'Port:') hb.add(l, 0) self.l_server_port = l s = wm.string(self, '8000') hb.add(s, 5) self.s_server_port = s vb.add(hb, 1) hb = wm.hbox() b = wm.button(self, 'Save', self.on_save) hb.add(b, 1) b = wm.button(self, 'Cancel', self.on_cancel) hb.add(b, 1) b = wm.button(self, 'Help') hb.add(b, 1) vb.add(hb, 1) self.SetSizer(vb) vb.SetSizeHints(self) self.SetAutoLayout(True) wx.CallAfter(self.update_enables)