| 122 | | def createDialog(self, *args, **kwargs): |
| 123 | | """Automatically hide the label because it's not used here""" |
| 124 | | FileBrowseButton.createDialog(self, *args, **kwargs) |
| 125 | | self.label.Hide() |
| | 122 | def createDialog( self, parent, id, pos, size, style, name ): |
| | 123 | """Setup the graphic representation of the dialog""" |
| | 124 | wx.Panel.__init__ (self, parent, id, pos, size, style, name) |
| | 125 | self.SetMinSize(size) # play nice with sizers |
| | 126 | |
| | 127 | box = wx.BoxSizer(wx.HORIZONTAL) |
| | 128 | |
| | 129 | self.label = self.createLabel( ) |
| | 130 | #box.Add( self.label, 0, wx.CENTER ) |
| | 131 | |
| | 132 | self.textControl = self.createTextControl() |
| | 133 | box.Add( self.textControl, 1, wx.LEFT|wx.CENTER, 0) |
| | 134 | |
| | 135 | self.browseButton = self.createBrowseButton() |
| | 136 | box.Add( self.browseButton, 0, wx.LEFT|wx.CENTER, 5) |
| | 137 | |
| | 138 | # add a border around the whole thing and resize the panel to fit |
| | 139 | outsidebox = wx.BoxSizer(wx.VERTICAL) |
| | 140 | outsidebox.Add(box, 1, wx.EXPAND|wx.ALL, 0) |
| | 141 | outsidebox.Fit(self) |
| | 142 | |
| | 143 | self.SetAutoLayout(True) |
| | 144 | self.SetSizer( outsidebox ) |
| | 145 | self.Layout() |
| | 146 | if type( size ) == types.TupleType: |
| | 147 | size = apply( wx.Size, size) |
| | 148 | self.SetDimensions(-1, -1, size.width, size.height, wx.SIZE_USE_EXISTING) |