Python wx.DD_DEFAULT_STYLE Examples
The following are 13
code examples of wx.DD_DEFAULT_STYLE().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wx
, or try the search function
.
Example #1
Source File: chronolapse.py From chronolapse with MIT License | 6 votes |
def dirBrowser(self, message, defaultpath): # show dir dialog dlg = wx.DirDialog( self, message=message, defaultPath= defaultpath, style=wx.DD_DEFAULT_STYLE) # Show the dialog and retrieve the user response. if dlg.ShowModal() == wx.ID_OK: # load directory path = dlg.GetPath() else: path = '' # Destroy the dialog. dlg.Destroy() return path
Example #2
Source File: wxgui.py From pyshortcuts with MIT License | 6 votes |
def onBrowseFolder(self, event=None): defdir = self.txt_folder.GetValue() if defdir in ('', 'Desktop'): defdir = DESKTOP dlg = wx.DirDialog(self, message='Select Folder for Shortcut', defaultPath=defdir, style = wx.DD_DEFAULT_STYLE) if dlg.ShowModal() == wx.ID_OK: folder = os.path.abspath(dlg.GetPath()) desktop = DESKTOP if folder.startswith(desktop): folder.replace(desktop, '') if folder.startswith('/'): folder = folder[1:] self.txt_folder.SetValue(folder) dlg.Destroy()
Example #3
Source File: widget_pack.py From me-ica with GNU Lesser General Public License v2.1 | 5 votes |
def __init__(self, parent, *args, **kwargs): wx.DirDialog.__init__(self, parent, 'Select Directory', style=wx.DD_DEFAULT_STYLE)
Example #4
Source File: GoSyncSettingPage.py From gosync with GNU General Public License v2.0 | 5 votes |
def OnChangeMirror(self, event): new_dir_help = "Your new local mirror directory is set. This will take effect after GoSync restart.\n\nPlease note that GoSync hasn't moved your files from old location. You would need to copy or move your current directory to new location before restarting GoSync." dlg = wx.DirDialog(None, "Choose target directory", "", wx.DD_DEFAULT_STYLE | wx.DD_DIR_MUST_EXIST) if dlg.ShowModal() == wx.ID_OK: self.sync_model.SetLocalMirrorDirectory(dlg.GetPath()) resp = wx.MessageBox(new_dir_help, "IMPORTANT INFORMATION", (wx.OK | wx.ICON_WARNING)) self.md.SetLabel(self.sync_model.GetLocalMirrorDirectory()) dlg.Destroy()
Example #5
Source File: choosers.py From pyFileFixity with MIT License | 5 votes |
def on_button(self, evt): dlg = wx.DirDialog(self.panel, 'Select directory', style=wx.DD_DEFAULT_STYLE) result = (dlg.GetPath() if dlg.ShowModal() == wx.ID_OK else None) if result: self.text_box.SetLabelText(result)
Example #6
Source File: create_new_project.py From DeepLabCut with GNU Lesser General Public License v3.0 | 5 votes |
def select_working_dir(self, event): cwd = os.getcwd() dlg = wx.DirDialog( self, "Choose the directory where your project will be saved:", cwd, style=wx.DD_DEFAULT_STYLE, ) if dlg.ShowModal() == wx.ID_OK: self.dir = dlg.GetPath()
Example #7
Source File: __init__.py From BitTorrent with GNU General Public License v3.0 | 5 votes |
def dialog(self): dialog = wx.DirDialog(self.parent, message=self.dialog_title, style=wx.DD_DEFAULT_STYLE|wx.DD_NEW_DIR_BUTTON) dialog.SetPath(self.get_choice()) return dialog
Example #8
Source File: __init__.py From BitTorrent with GNU General Public License v3.0 | 5 votes |
def directory_dialog(self): dialog = wx.DirDialog(self.parent, message=self.directory_dialog_title, style=wx.DD_DEFAULT_STYLE|wx.DD_NEW_DIR_BUTTON) dialog.SetPath(self.get_choice()) return dialog
Example #9
Source File: SettingsWindow.py From BitTorrent with GNU General Public License v3.0 | 5 votes |
def get_save_in(self, *e): d = wx.DirDialog(self, "", style=wx.DD_DEFAULT_STYLE|wx.DD_NEW_DIR_BUTTON) d.SetPath(self.config['save_in']) if d.ShowModal() == wx.ID_OK: path = d.GetPath() self.saving_panel.save_in_button.SetLabel(path) self.setfunc('save_in', path)
Example #10
Source File: control.py From atbswp with GNU General Public License v3.0 | 5 votes |
def load_file(self, event): """Load a capture manually chosen by the user.""" title = "Choose a capture file:" dlg = wx.FileDialog(self.parent, message=title, defaultDir="~", defaultFile="capture.py", style=wx.DD_DEFAULT_STYLE) if dlg.ShowModal() == wx.ID_OK: self._capture = self.load_content(dlg.GetPath()) with open(TMP_PATH, 'w') as f: f.write(self._capture) dlg.Destroy()
Example #11
Source File: preferencesdialog.py From wxGlade with MIT License | 5 votes |
def on_widget_path(self, event): "Create a file choice dialog" pth = wx.DirSelector(_("Choose a directory:"), os.getcwd(), style=wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON) if pth: self.local_widget_path.SetValue(pth) # end of class wxGladePreferences
Example #12
Source File: application.py From wxGlade with MIT License | 5 votes |
def __init__(self, parent, wildcard=_("All files|*"), file_message=_("Choose a file"),dir_message=None,file_style=0): self.prev_dir = config.preferences.codegen_path or "" self.wildcard = wildcard self.file_message = file_message self.dir_message = dir_message self.file_style = file_style self.dir_style = wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON self.parent = parent self.value = None self.default_extension = None
Example #13
Source File: GUI_utils.py From topoflow with MIT License | 5 votes |
def Get_Directory(): dialog = wx.DirDialog(None, "Choose a directory:", \ style=wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON) if (dialog.ShowModal() == wx.ID_OK): directory = dialog.GetPath() else: directory = None dialog.Destroy() return directory # Get_Directory() #----------------------------------------------------------------