def createDialog(self, prnt): MakerDialog.__init__( self, { 'name': '', 'parent': prnt, 'pos': wx.Point(497, 197), 'size': wx.Size(309, 459), 'style': wx.DEFAULT_DIALOG_STYLE, 'title': 'Select a Project', 'clientSize': wx.Size(301, 425), 'centerPos': wx.BOTH }) # ----- LISTBOX ----- self.listBox1 = self.add( 'listbox', { 'choices': [], 'name': 'listBox1', 'parent': self, 'pos': wx.Point(0, 13), 'size': wx.Size(301, 328), 'style': wx.VSCROLL, 'handler': self.onListBoxClick }) # ----- PANEL ----- self.panel1 = self.add( 'panel', { 'name': 'panel1', 'parent': self, 'pos': wx.Point(0, 341), 'size': wx.Size(301, 80), 'style': wx.TAB_TRAVERSAL }) # ----- OK BUTTON ----- self.OKbutton = self.add( 'button', { 'label': 'OK', 'name': 'ok', 'parent': self.panel1, 'pos': wx.Point(208, 24), 'size': wx.Size(75, 23), 'style': 0, 'handler': self.onOKButton }) # ----- CANCEL BUTTON ----- self.cancelButton = self.add( 'button', { 'label': 'Cancel', 'name': 'cancel', 'parent': self.panel1, 'pos': wx.Point(120, 24), 'size': wx.Size(75, 23), 'style': 0, 'handler': self.onCancelButton }) self.createSizers()
def createDialog(self, prnt): MakerDialog.__init__(self, {'name' : '', 'parent' : prnt, 'pos' : wx.Point(392, 323), 'size' : wx.Size(391, 63), 'style' : wx.DEFAULT_DIALOG_STYLE, 'title' : 'Import or create a project', 'clientSize' : wx.Size(391, 63), 'centerPos' : wx.BOTH}) # ----- NEW PROJECT BUTTON ----- self.newProjButton = self.add('button', {'label' : 'Create New Project', 'name' : 'newProject', 'parent' : self, 'pos' : wx.Point(202, 17), 'size' : wx.Size(176, 30), 'style' : 0, 'handler' : self.onNewProject}) # ----- IMPORT PROJECT BUTTON ----- self.newProjButton = self.add('button', {'label' : 'Import Project', 'name' : 'importProject', 'parent' : self, 'pos' : wx.Point(10, 17), 'size' : wx.Size(184, 30), 'style' : 0, 'handler' : self.onImportProject})
def createDialog(self, prnt): MakerDialog.__init__(self, {'name' : 'Edit', 'parent' : prnt, 'pos' : wx.Point(437, 249), 'size' : wx.Size(400, 520), 'style' : wx.DEFAULT_DIALOG_STYLE, 'title' : 'default remote folders', 'clientSize' : wx.Size(400, 520), 'centerPos' : wx.BOTH}) # please don't use any sorting styles like wx.LC_SORT_ASCENDING # because of zebra table hack styleValue = wx.LC_REPORT | wx.BORDER_NONE self.listCtrl = DistListCtrl(self, -1, style=styleValue) self.parent = prnt # ----- TOOLBAR ----- self.toolBar = self.add('toolbar', {'name' : 'toolBar', 'parent' : self, 'pos' : wx.Point(0, 0), 'size' : wx.Size(400, 28), 'style' : wx.TB_HORIZONTAL | wx.NO_BORDER}) # ----- WINDOW ----- self.window = self.add('window', {'name' : 'window', 'parent' : self, 'pos' : wx.Point(0, 545), 'size' : wx.Size(400, 80), 'style' : wx.FULL_REPAINT_ON_RESIZE}) # ----- SAVE SYSTEM SETUP BUTTON ----- self.saveButton = self.add('button', {'label' : 'OK', 'name' : 'saveSystemSetup', 'parent' : self.window, 'pos' : None, 'size' : None, 'style' : 0, 'handler' : self.onSaveButton}) # ----- CANCEL SYSTEM SETUP BUTTON ----- self.cancelButton = self.add('button', {'label' : 'Cancel', 'name' : 'cancelSystemSetup', 'parent' : self.window, 'pos' : None, 'size' : None, 'style' : 0, 'handler' : self.onCancelButton}) self.createSizers() self.Bind(wx.EVT_LIST_BEGIN_LABEL_EDIT,self.validateColumn)
def createDialog(self, prnt): MakerDialog.__init__(self, {'name' : '', 'parent' : prnt, 'pos' : wx.Point(490, 398), 'size' : wx.Size(647, 318), 'style' : wx.DEFAULT_DIALOG_STYLE, 'title' : 'About', 'clientSize' : wx.Size(639, 284), 'centerPos' : wx.BOTH}) # ----- OK BUTTON ----- self.OKbutton = self.add('button', {'label' : 'OK', 'name' : 'okButton', 'parent' : self, 'pos' : None, 'size' : None, 'style' : 0, 'handler' : self.onOKButton}) iName = os.path.join(os.path.dirname(sys.argv[0]), 'system/Splash.png') theBitMap = wx.Bitmap(iName, wx.BITMAP_TYPE_PNG) self.staticBitmap1 = wx.StaticBitmap(self, id=wx.NewId(), bitmap=theBitMap, pos=wx.Point(0, 0), size=wx.Size(641, 246), style=0, name='staticBitmap1') self.staticText1 = self.add('staticText', {'label' : 'Version number', 'name' : 'staticText1', 'parent' : self, 'pos' : wx.Point(10, 250), 'size' : wx.Size(184, 13), 'style' : 0}) self.staticText1.SetLabel(u'Version: %s' % str(self.version)) # set correct position for button # using a sizer for just one button seemed overkill buttonSize = self.OKbutton.GetSizeTuple() winSize = self.GetSizeTuple() diff = winSize[0] - buttonSize[0] self.OKbutton.SetPosition(wx.Point(diff - 10, 245))
def createDialog(self, prnt): MakerDialog.__init__(self, {'name' : '', 'parent' : prnt, 'pos' : wx.Point(259, 72), 'size' : wx.Size(400, 180), 'style' : wx.DEFAULT_DIALOG_STYLE, 'title' : 'Rename File', 'clientSize' : wx.Size(400, 120), 'centerPos' : wx.BOTH}) self.warning = self.add('staticText', {'label' : '', 'name' : 'warning', 'parent' : self, 'pos' : wx.Point(20, 18), 'size' : wx.Size(128, 25), 'style' : 0}) # make warning label RED self.warning.SetForegroundColour(wx.RED) self.Ok = self.add('buttonNoHandler', {'label' : 'Rename', 'name' : 'rename', 'parent' : self, 'pos' : wx.Point(300, 48), 'size' : wx.Size(80, 25), 'style' : 0}) self.newName = self.add('textCtrl', {'name' : 'new_name', 'parent' : self, 'pos' : wx.Point(20, 48), 'size' : wx.Size(250, 25), 'style' : 0, 'value' : 'newName' })
def createDialog(self, prnt): MakerDialog.__init__( self, { 'name': '', 'parent': prnt, 'pos': wx.Point(259, 72), 'size': wx.Size(400, 180), 'style': wx.DEFAULT_DIALOG_STYLE, 'title': 'Rename File', 'clientSize': wx.Size(400, 120), 'centerPos': wx.BOTH }) self.warning = self.add( 'staticText', { 'label': '', 'name': 'warning', 'parent': self, 'pos': wx.Point(20, 18), 'size': wx.Size(128, 25), 'style': 0 }) # make warning label RED self.warning.SetForegroundColour(wx.RED) self.Ok = self.add( 'buttonNoHandler', { 'label': 'Rename', 'name': 'rename', 'parent': self, 'pos': wx.Point(300, 48), 'size': wx.Size(80, 25), 'style': 0 }) self.newName = self.add( 'textCtrl', { 'name': 'new_name', 'parent': self, 'pos': wx.Point(20, 48), 'size': wx.Size(250, 25), 'style': 0, 'value': 'newName' })
def createDialog(self, prnt): MakerDialog.__init__(self, {'name' : '', 'parent' : prnt, 'pos' : wx.Point(259, 72), 'size' : wx.Size(505, 590), 'style' : wx.DEFAULT_DIALOG_STYLE, 'title' : 'Image Tool', 'clientSize' : wx.Size(497, 556), 'centerPos' : wx.BOTH}) self.staticBitmap1 = self.add('staticBitmap', {'bitmap' : wx.NullBitmap, 'name' : 'staticBitmap1', 'parent' : self, 'pos' : wx.Point(16, 16), 'size' : wx.Size(400, 320), 'style' : wx.BORDER_NONE}) self.res_x = self.add('textCtrl', {'name' : 'res_x', 'parent' : self, 'pos' : wx.Point(16, 475), 'size' : wx.Size(56, 25), 'style' : 0, 'value' : '-' }) self.res_y = self.add('textCtrl', {'name' : 'res_y', 'parent' : self, 'pos' : wx.Point(82, 475), 'size' : wx.Size(48, 25), 'style' : 0, 'value' : '-' }) self.staticText1 = self.add('staticText', {'label' : 'Width', 'name' : 'staticText1', 'parent' : self, 'pos' : wx.Point(18, 445), 'size' : wx.Size(16, 25), 'style' : 0}) self.staticText2 = self.add('staticText', {'label' : 'Height', 'name' : 'staticText2', 'parent' : self, 'pos' : wx.Point(78, 445), 'size' : wx.Size(8, 25), 'style' : 0}) self.warning = self.add('staticText', {'label' : '', 'name' : 'warning', 'parent' : self, 'pos' : wx.Point(145, 445), 'size' : wx.Size(128, 25), 'style' : 0}) # make warning label RED self.warning.SetForegroundColour(wx.RED) self.keepRatio = wx.CheckBox(self, -1, "Keep Proportions", pos=wx.Point(16, 415), size=wx.Size(180, 25), style=0) self.buttonImport = self.add('buttonNoHandler', {'label' : 'Import', 'name' : 'buttonscale', 'parent' : self, 'pos' : wx.Point(380, 463), 'size' : wx.Size(80, 40), 'style' : 0}) self.cancel_button = self.add('buttonNoHandler', {'label' : 'Cancel', 'name' : 'cancel_button', 'parent' : self, 'pos' : wx.Point(290, 463), 'size' : wx.Size(80, 40), 'style' : 0}) self.new_name = self.add('textCtrl', {'name' : 'new_name', 'parent' : self, 'pos' : wx.Point(145, 475), 'size' : wx.Size(135, 25), 'style' : 0, 'value' : 'newName' })
def createDialog(self, prnt): MakerDialog.__init__(self, {'name' : 'ProjectSetup', 'parent' : prnt, 'pos' : wx.Point(439, 179), 'size' : wx.Size(394, 380), 'style' : wx.DEFAULT_DIALOG_STYLE, 'title' : 'Setup FTP Connection...', 'clientSize' : wx.Size(394, 355), 'centerPos' : wx.BOTH}) # self.sprache = self.add('choice', # {'choices' : ['en', 'de'], # 'name' : 'sprache_choice', # 'parent' : self, # 'pos' : wx.Point(232, 32), # 'size' : wx.Size(130, 21), # 'style' : 0 # }) # self.add_language = self.add('choice', # {'choices' : ['en', 'de', 'None'], # 'name' : 'add_lang_choice', # 'parent' : self, # 'pos' : wx.Point(232, 72), # 'size' : wx.Size(130, 21), # 'style' : 0 # }) self.ftp_host = self.add('textCtrl', {'name' : 'ftp_host_ctl', 'parent' : self, 'pos' : wx.Point(136, 116), 'size' : wx.Size(232, 21), 'style' : 0, 'value' : 'www.myhost.com' }) self.ftp_user = self.add('textCtrl', {'name' : 'ftp_user_ctl', 'parent' : self, 'pos' : wx.Point(136, 156), 'size' : wx.Size(232, 21), 'style' : 0, 'value' : 'ftpuser' }) self.browse_server = self.add('button', {'label' : 'Browse', 'name' : 'browse', 'parent' : self, 'pos' : wx.Point(280, 190), 'size' : wx.Size(80, 23), 'style' : 0, 'handler' : self.onBrowseButton }) self.ftp_root = self.add('textCtrl', {'name' : 'ftp_root_ctl', 'parent' : self, 'pos' : wx.Point(136, 196), 'size' : wx.Size(132, 21), 'style' : 0, 'value' : '/path_to_my_project/' }) #self.ftp_root.Enable(False) self.url = self.add('textCtrl', {'name' : 'url_ctl', 'parent' : self, 'pos' : wx.Point(136, 238), 'size' : wx.Size(232, 21), 'style' : 0, 'value' : 'http://www.myurl.com' }) self.cancel = self.add('button', {'label' : 'Cancel', 'name' : 'cancel', 'parent' : self, 'pos' : wx.Point(208, 308), 'size' : wx.Size(75, 23), 'style' : 0, 'handler' : self.onCancelButton }) self.Ok = self.add('button', {'label' : 'OK', 'name' : 'ok', 'parent' : self, 'pos' : wx.Point(296, 308), 'size' : wx.Size(75, 23), 'style' : 0, 'handler' : self.onOkButton }) # self.staticLine1 = self.add('staticLine', # {'name' : 'staticLine1', # 'parent' : self, # 'pos' : wx.Point(24, 128), # 'size' : wx.Size(336, 2), # 'style' : 0}) self.gfx_label = self.add('staticText', {'label' : 'Name for remote graphics folder:', 'name' : 'gfx_label', 'parent' : self, 'pos' : wx.Point(24, 24), 'size' : wx.Size(230, 18), 'style' : 0}) self.gfxFolder = self.add('textCtrl', {'name' : 'rem_gfx_folder', 'parent' : self, 'pos' : wx.Point(136, 54), 'size' : wx.Size(232, 21), 'style' : 0, 'value' : '' }) self.staticLine1 = self.add('staticLine', {'name' : 'staticLine1', 'parent' : self, 'pos' : wx.Point(24, 90), 'size' : wx.Size(336, 2), 'style' : 0}) self.help = self.add('button', {'label' : 'Help', 'name' : 'help', 'parent' : self, 'pos' : wx.Point(16, 308), 'size' : wx.Size(75, 23), 'style' : 0, 'handler' : self.onHelpButton }) # self.staticText1 = self.add('staticText', # {'label' : 'Project language:', # 'name' : 'staticText1', # 'parent' : self, # 'pos' : wx.Point(24, 40), # 'size' : wx.Size(122, 20), # 'style' : 0}) self.staticText3 = self.add('staticText', {'label' : 'FTP Host:', 'name' : 'staticText3', 'parent' : self, 'pos' : wx.Point(24, 116), 'size' : wx.Size(99, 20), 'style' : 0}) self.staticText4 = self.add('staticText', {'label' : 'FTP User:'******'name' : 'staticText4', 'parent' : self, 'pos' : wx.Point(24, 156), 'size' : wx.Size(106, 20), 'style' : 0}) self.staticText6 = self.add('staticText', {'label' : 'Path to Project:', 'name' : 'staticText6', 'parent' : self, 'pos' : wx.Point(24, 196), 'size' : wx.Size(100, 20), 'style' : 0}) self.staticText7 = self.add('staticText', {'label' : 'Project url:', 'name' : 'staticText7', 'parent' : self, 'pos' : wx.Point(24, 238), 'size' : wx.Size(100, 20), 'style' : 0})
def createDialog(self, prnt): MakerDialog.__init__(self, {'name' : 'ProjectSetup', 'parent' : prnt, 'pos' : wx.Point(439, 179), 'size' : wx.Size(394, 380), 'style' : wx.DEFAULT_DIALOG_STYLE, 'title' : 'Setup FTP Connection...', 'clientSize' : wx.Size(394, 355), 'centerPos' : wx.BOTH}) # self.sprache = self.add('choice', # {'choices' : ['en', 'de'], # 'name' : 'sprache_choice', # 'parent' : self, # 'pos' : wx.Point(232, 32), # 'size' : wx.Size(130, 21), # 'style' : 0 # }) # self.add_language = self.add('choice', # {'choices' : ['en', 'de', 'None'], # 'name' : 'add_lang_choice', # 'parent' : self, # 'pos' : wx.Point(232, 72), # 'size' : wx.Size(130, 21), # 'style' : 0 # }) self.ftp_host = self.add('textCtrl', {'name' : 'ftp_host_ctl', 'parent' : self, 'pos' : wx.Point(136, 116), 'size' : wx.Size(232, 21), 'style' : 0, 'value' : 'www.myhost.com' }) self.ftp_user = self.add('textCtrl', {'name' : 'ftp_user_ctl', 'parent' : self, 'pos' : wx.Point(136, 156), 'size' : wx.Size(232, 21), 'style' : 0, 'value' : 'ftpuser' }) self.browse_server = self.add('button', {'label' : 'Browse', 'name' : 'browse', 'parent' : self, 'pos' : wx.Point(280, 196), 'size' : wx.Size(80, 23), 'style' : 0, 'handler' : self.onBrowseButton }) self.ftp_root = self.add('textCtrl', {'name' : 'ftp_root_ctl', 'parent' : self, 'pos' : wx.Point(136, 196), 'size' : wx.Size(132, 21), 'style' : 0, 'value' : '/path_to_my_project/' }) #self.ftp_root.Enable(False) self.url = self.add('textCtrl', {'name' : 'url_ctl', 'parent' : self, 'pos' : wx.Point(136, 238), 'size' : wx.Size(232, 21), 'style' : 0, 'value' : 'http://www.myurl.com' }) self.cancel = self.add('button', {'label' : 'Cancel', 'name' : 'cancel', 'parent' : self, 'pos' : wx.Point(208, 308), 'size' : wx.Size(75, 23), 'style' : 0, 'handler' : self.onCancelButton }) self.Ok = self.add('button', {'label' : 'OK', 'name' : 'ok', 'parent' : self, 'pos' : wx.Point(296, 308), 'size' : wx.Size(75, 23), 'style' : 0, 'handler' : self.onOkButton }) # self.staticLine1 = self.add('staticLine', # {'name' : 'staticLine1', # 'parent' : self, # 'pos' : wx.Point(24, 128), # 'size' : wx.Size(336, 2), # 'style' : 0}) self.gfx_label = self.add('staticText', {'label' : 'Name for remote graphics folder:', 'name' : 'gfx_label', 'parent' : self, 'pos' : wx.Point(24, 24), 'size' : wx.Size(230, 18), 'style' : 0}) self.gfxFolder = self.add('textCtrl', {'name' : 'rem_gfx_folder', 'parent' : self, 'pos' : wx.Point(136, 54), 'size' : wx.Size(232, 21), 'style' : 0, 'value' : '' }) self.staticLine1 = self.add('staticLine', {'name' : 'staticLine1', 'parent' : self, 'pos' : wx.Point(24, 90), 'size' : wx.Size(336, 2), 'style' : 0}) self.help = self.add('button', {'label' : 'Help', 'name' : 'help', 'parent' : self, 'pos' : wx.Point(16, 308), 'size' : wx.Size(75, 23), 'style' : 0, 'handler' : self.onHelpButton }) # self.staticText1 = self.add('staticText', # {'label' : 'Project language:', # 'name' : 'staticText1', # 'parent' : self, # 'pos' : wx.Point(24, 40), # 'size' : wx.Size(122, 20), # 'style' : 0}) self.staticText3 = self.add('staticText', {'label' : 'FTP Host:', 'name' : 'staticText3', 'parent' : self, 'pos' : wx.Point(24, 116), 'size' : wx.Size(99, 20), 'style' : 0}) self.staticText4 = self.add('staticText', {'label' : 'FTP User:'******'name' : 'staticText4', 'parent' : self, 'pos' : wx.Point(24, 156), 'size' : wx.Size(106, 20), 'style' : 0}) self.staticText6 = self.add('staticText', {'label' : 'Path to Project:', 'name' : 'staticText6', 'parent' : self, 'pos' : wx.Point(24, 196), 'size' : wx.Size(100, 20), 'style' : 0}) self.staticText7 = self.add('staticText', {'label' : 'Project url:', 'name' : 'staticText7', 'parent' : self, 'pos' : wx.Point(24, 238), 'size' : wx.Size(100, 20), 'style' : 0})
def createDialog(self, prnt): MakerDialog.__init__( self, { 'name': 'Edit', 'parent': prnt, 'pos': wx.Point(437, 249), 'size': wx.Size(754, 616), 'style': wx.DEFAULT_DIALOG_STYLE, 'title': 'Edit the Distribution Table', 'clientSize': wx.Size(746, 582), 'centerPos': wx.BOTH }) # please don't use any sorting styles like wx.LC_SORT_ASCENDING # because of zebra table hack styleValue = wx.LC_REPORT | wx.BORDER_NONE self.listCtrl = DistListCtrl(self, -1, style=styleValue) self.parent = prnt # ----- TOOLBAR ----- self.toolBar = self.add( 'toolbar', { 'name': 'toolBar', 'parent': self, 'pos': wx.Point(0, 0), 'size': wx.Size(746, 28), 'style': wx.TB_HORIZONTAL | wx.NO_BORDER }) # ----- WINDOW ----- self.window = self.add( 'window', { 'name': 'window', 'parent': self, 'pos': wx.Point(0, 545), 'size': wx.Size(746, 80), 'style': wx.FULL_REPAINT_ON_RESIZE }) # ----- SAVE SYSTEM SETUP BUTTON ----- self.saveButton = self.add( 'button', { 'label': 'OK', 'name': 'saveSystemSetup', 'parent': self.window, 'pos': None, 'size': None, 'style': 0, 'handler': self.onSaveButton }) # ----- CANCEL SYSTEM SETUP BUTTON ----- self.cancelButton = self.add( 'button', { 'label': 'Cancel', 'name': 'cancelSystemSetup', 'parent': self.window, 'pos': None, 'size': None, 'style': 0, 'handler': self.onCancelButton }) # ----- Edit Preferences BUTTON ----- self.defaultFolderButton = self.add( 'buttonNoHandler', { 'label': 'default Folders', 'name': 'defaultFolders', 'parent': self.window, 'pos': None, 'size': None, 'style': 0 }) self.createSizers()
def createDialog(self, prnt): MakerDialog.__init__( self, { "name": "ftpBrowser", "parent": prnt, "pos": wx.Point(441, 187), "size": wx.Size(387, 501), "style": wx.DEFAULT_DIALOG_STYLE, "title": "FTP Browser", "clientSize": wx.Size(387, 501), "centerPos": wx.BOTH, }, ) # ----- LIST BOX ----- self.listBox = self.add( "listbox", { "choices": [], "name": "listBox", "parent": self, "pos": wx.Point(0, 53), "size": wx.Size(385, 352), "style": 0, "handler": self.ftpBrowserAction_select_, }, ) # ----- WINDOW 1 ----- self.win1 = self.add( "window", {"name": "win1", "parent": self, "pos": wx.Point(0, 0), "size": wx.Size(387, 50), "style": 0} ) # ----- WINDOW 2 ----- self.win2 = self.add( "window", {"name": "win2", "parent": self, "pos": wx.Point(0, 405), "size": wx.Size(387, 50), "style": 0} ) # ----- OK BUTTON ----- self.OKbutton = self.add( "button", { "label": "OK", "name": "OK", "parent": self.win2, "pos": wx.Point(290, 60), "size": wx.Size(75, 25), "style": 0, "handler": self.ftpBrowserAction_Ok_, }, ) # ----- CANCEL BUTTON ----- self.cancelButton = self.add( "button", { "label": "Cancel", "name": "cancel", "parent": self.win2, "pos": wx.Point(200, 60), "size": wx.Size(80, 25), "style": 0, "handler": self.ftpBrowserAction_cancel_, }, ) # ----- NEW FOLDER BUTTON ----- self.newFolderButton = self.add( "button", { "label": "New Folder", "name": "newfolder", "parent": self.win1, "pos": wx.Point(280, 16), "size": wx.Size(90, 25), "style": 0, "handler": self.ftpBrowserAction_newFolder_, }, ) # ----- DELETE BUTTON ----- self.deleteButton = self.add( "button", { "label": "Delete", "name": "delete", "parent": self.win1, "pos": wx.Point(200, 16), "size": wx.Size(75, 25), "style": 0, "handler": self.ftpBrowserAction_delete_, }, ) # ----- HELP BUTTON ----- self.helpButton = self.add( "button", { "label": "Help", "name": "help", "parent": self.win2, "pos": wx.Point(8, 60), "size": wx.Size(75, 25), "style": 0, "handler": self.onHelpButton, }, ) # ----- UP BUTTON ----- self.upButton = self.add( "button", { "label": "Up", "name": "up", "parent": self.win1, "pos": wx.Point(8, 16), "size": wx.Size(75, 25), "style": 0, "handler": self.ftpBrowserAction_up_, }, ) self.createSizers()
def createDialog(self, prnt): MakerDialog.__init__(self, {'name' : 'ftpBrowser', 'parent' : prnt, 'pos' : wx.Point(441, 187), 'size' : wx.Size(387, 501), 'style' : wx.DEFAULT_DIALOG_STYLE, 'title' : 'FTP Browser', 'clientSize' : wx.Size(387, 501), 'centerPos' : wx.BOTH}) # ----- LIST BOX ----- self.listBox = self.add('listbox', {'choices' : [], 'name' : 'listBox', 'parent' : self, 'pos' : wx.Point(0, 53), 'size' : wx.Size(385, 352), 'style' : 0, 'handler' : self.ftpBrowserAction_select_}) # ----- WINDOW 1 ----- self.win1 = self.add('window', {'name' : 'win1', 'parent' : self, 'pos' : wx.Point(0, 0), 'size' : wx.Size(387, 50), 'style' : 0 }) # ----- WINDOW 2 ----- self.win2 = self.add('window', {'name' : 'win2', 'parent' : self, 'pos' : wx.Point(0, 405), 'size' : wx.Size(387, 50), 'style' : 0 }) # ----- OK BUTTON ----- self.OKbutton = self.add('button', {'label' : 'OK', 'name' : 'OK', 'parent' : self.win2, 'pos' : wx.Point(290, 60), 'size' : wx.Size(75, 25), 'style' : 0, 'handler' : self.ftpBrowserAction_Ok_}) # ----- CANCEL BUTTON ----- self.cancelButton = self.add('button', {'label' : 'Cancel', 'name' : 'cancel', 'parent' : self.win2, 'pos' : wx.Point(200, 60), 'size' : wx.Size(80, 25), 'style' : 0, 'handler' : self.ftpBrowserAction_cancel_}) # ----- NEW FOLDER BUTTON ----- self.newFolderButton = self.add('button', {'label' : 'New Folder', 'name' : 'newfolder', 'parent' : self.win1, 'pos' : wx.Point(280, 16), 'size' : wx.Size(90, 25), 'style' : 0, 'handler' : self.ftpBrowserAction_newFolder_}) # ----- DELETE BUTTON ----- self.deleteButton = self.add('button', {'label' : 'Delete', 'name' : 'delete', 'parent' : self.win1, 'pos' : wx.Point(200, 16), 'size' : wx.Size(75, 25), 'style' : 0, 'handler' : self.ftpBrowserAction_delete_}) # ----- HELP BUTTON ----- self.helpButton = self.add('button', {'label' : 'Help', 'name' : 'help', 'parent' : self.win2, 'pos' : wx.Point(8, 60), 'size' : wx.Size(75, 25), 'style' : 0, 'handler' : self.onHelpButton}) # ----- UP BUTTON ----- self.upButton = self.add('button', {'label' : 'Up', 'name' : 'up', 'parent' : self.win1, 'pos' : wx.Point(8, 16), 'size' : wx.Size(75, 25), 'style' : 0, 'handler' : self.ftpBrowserAction_up_}) self.createSizers()
def createDialog(self, prnt): MakerDialog.__init__( self, { 'name': 'ftpBrowser', 'parent': prnt, 'pos': wx.Point(441, 187), 'size': wx.Size(387, 501), 'style': wx.DEFAULT_DIALOG_STYLE, 'title': 'FTP Browser', 'clientSize': wx.Size(387, 501), 'centerPos': wx.BOTH }) # ----- LIST BOX ----- self.listBox = self.add( 'listbox', { 'choices': [], 'name': 'listBox', 'parent': self, 'pos': wx.Point(0, 53), 'size': wx.Size(385, 352), 'style': 0, 'handler': self.ftpBrowserAction_select_ }) # ----- WINDOW 1 ----- self.win1 = self.add( 'window', { 'name': 'win1', 'parent': self, 'pos': wx.Point(0, 0), 'size': wx.Size(387, 50), 'style': 0 }) # ----- WINDOW 2 ----- self.win2 = self.add( 'window', { 'name': 'win2', 'parent': self, 'pos': wx.Point(0, 405), 'size': wx.Size(387, 50), 'style': 0 }) # ----- OK BUTTON ----- self.OKbutton = self.add( 'button', { 'label': 'OK', 'name': 'OK', 'parent': self.win2, 'pos': wx.Point(290, 60), 'size': wx.Size(75, 25), 'style': 0, 'handler': self.ftpBrowserAction_Ok_ }) # ----- CANCEL BUTTON ----- self.cancelButton = self.add( 'button', { 'label': 'Cancel', 'name': 'cancel', 'parent': self.win2, 'pos': wx.Point(200, 60), 'size': wx.Size(80, 25), 'style': 0, 'handler': self.ftpBrowserAction_cancel_ }) # ----- NEW FOLDER BUTTON ----- self.newFolderButton = self.add( 'button', { 'label': 'New Folder', 'name': 'newfolder', 'parent': self.win1, 'pos': wx.Point(280, 16), 'size': wx.Size(90, 25), 'style': 0, 'handler': self.ftpBrowserAction_newFolder_ }) # ----- DELETE BUTTON ----- self.deleteButton = self.add( 'button', { 'label': 'Delete', 'name': 'delete', 'parent': self.win1, 'pos': wx.Point(200, 16), 'size': wx.Size(75, 25), 'style': 0, 'handler': self.ftpBrowserAction_delete_ }) # ----- HELP BUTTON ----- self.helpButton = self.add( 'button', { 'label': 'Help', 'name': 'help', 'parent': self.win2, 'pos': wx.Point(8, 60), 'size': wx.Size(75, 25), 'style': 0, 'handler': self.onHelpButton }) # ----- UP BUTTON ----- self.upButton = self.add( 'button', { 'label': 'Up', 'name': 'up', 'parent': self.win1, 'pos': wx.Point(8, 16), 'size': wx.Size(75, 25), 'style': 0, 'handler': self.ftpBrowserAction_up_ }) self.createSizers()
def createDialog(self, prnt): MakerDialog.__init__( self, { 'name': '', 'parent': prnt, 'pos': wx.Point(259, 72), 'size': wx.Size(505, 590), 'style': wx.DEFAULT_DIALOG_STYLE, 'title': 'Image Tool', 'clientSize': wx.Size(497, 556), 'centerPos': wx.BOTH }) self.staticBitmap1 = self.add( 'staticBitmap', { 'bitmap': wx.NullBitmap, 'name': 'staticBitmap1', 'parent': self, 'pos': wx.Point(16, 16), 'size': wx.Size(400, 320), 'style': wx.BORDER_NONE }) self.res_x = self.add( 'textCtrl', { 'name': 'res_x', 'parent': self, 'pos': wx.Point(16, 475), 'size': wx.Size(56, 25), 'style': 0, 'value': '-' }) self.res_y = self.add( 'textCtrl', { 'name': 'res_y', 'parent': self, 'pos': wx.Point(82, 475), 'size': wx.Size(48, 25), 'style': 0, 'value': '-' }) self.staticText1 = self.add( 'staticText', { 'label': 'Width', 'name': 'staticText1', 'parent': self, 'pos': wx.Point(18, 445), 'size': wx.Size(16, 25), 'style': 0 }) self.staticText2 = self.add( 'staticText', { 'label': 'Height', 'name': 'staticText2', 'parent': self, 'pos': wx.Point(78, 445), 'size': wx.Size(8, 25), 'style': 0 }) self.warning = self.add( 'staticText', { 'label': '', 'name': 'warning', 'parent': self, 'pos': wx.Point(145, 445), 'size': wx.Size(128, 25), 'style': 0 }) # make warning label RED self.warning.SetForegroundColour(wx.RED) self.keepRatio = wx.CheckBox(self, -1, "Keep Proportions", pos=wx.Point(16, 415), size=wx.Size(180, 25), style=0) self.buttonImport = self.add( 'buttonNoHandler', { 'label': 'Import', 'name': 'buttonscale', 'parent': self, 'pos': wx.Point(380, 463), 'size': wx.Size(80, 40), 'style': 0 }) self.cancel_button = self.add( 'buttonNoHandler', { 'label': 'Cancel', 'name': 'cancel_button', 'parent': self, 'pos': wx.Point(290, 463), 'size': wx.Size(80, 40), 'style': 0 }) self.new_name = self.add( 'textCtrl', { 'name': 'new_name', 'parent': self, 'pos': wx.Point(145, 475), 'size': wx.Size(135, 25), 'style': 0, 'value': 'newName' })