X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b881fc787d2823bdd8a415080b82feee90804a17..66394199cf03f0e9a3a675fe9829d31463ad38bb:/wxPython/wx/lib/filebrowsebutton.py diff --git a/wxPython/wx/lib/filebrowsebutton.py b/wxPython/wx/lib/filebrowsebutton.py index 708e1edada..9777d73861 100644 --- a/wxPython/wx/lib/filebrowsebutton.py +++ b/wxPython/wx/lib/filebrowsebutton.py @@ -338,19 +338,17 @@ class DirBrowseButton(FileBrowseButton): labelText, buttonText, toolTip, dialogTitle, startDirectory, changeCallback = changeCallback) - # - self._dirDialog = dialogClass(self, - message = dialogTitle, - defaultPath = startDirectory) + self.dialogClass = dialogClass # + def OnBrowse(self, ev = None): - dialog = self._dirDialog + dialog = self.dialogClass(self, + message = self.dialogTitle, + defaultPath = self.startDirectory) if dialog.ShowModal() == wx.ID_OK: self.SetValue(dialog.GetPath()) + dialog.Destroy() # - def __del__(self): - if self.__dict__.has_key('_dirDialog'): - self._dirDialog.Destroy() #----------------------------------------------------------------------