X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fdc775af55c604458345c7045b8478fa230e3bce..64fa6f167ebb404e5441eddcee5bbd0808466d7a:/wxPython/wx/lib/filebrowsebutton.py?ds=sidebyside diff --git a/wxPython/wx/lib/filebrowsebutton.py b/wxPython/wx/lib/filebrowsebutton.py index 230551d419..9d7d29b567 100644 --- a/wxPython/wx/lib/filebrowsebutton.py +++ b/wxPython/wx/lib/filebrowsebutton.py @@ -52,7 +52,7 @@ class FileBrowseButton(wx.Panel): :param startDirectory: Default directory for file dialog startup :param fileMask: File mask (glob pattern, such as *.*) to use in file dialog :param fileMode: wx.OPEN or wx.SAVE, indicates type of file dialog to use - :param changeCallback: callback receives all changes in value of control + :param changeCallback: Optional callback called for all changes in value of the control """ # store variables @@ -86,11 +86,17 @@ class FileBrowseButton(wx.Panel): def createDialog( self, parent, id, pos, size, style ): """Setup the graphic representation of the dialog""" wx.Panel.__init__ (self, parent, id, pos, size, style) + self.SetMinSize(size) # play nice with sizers + # try to set the background colour try: - self.SetBackgroundColour(self._bc) + #Question: is this still needed on other platforms? + #It should have transparent background on Mac + if wx.Platform != "__WXMAC__": + self.SetBackgroundColour(self._bc) except: pass + box = wx.BoxSizer(wx.HORIZONTAL) self.label = self.createLabel( )