当前位置: 首页>>代码示例>>Python>>正文


Python wx.DD_DEFAULT_STYLE属性代码示例

本文整理汇总了Python中wx.DD_DEFAULT_STYLE属性的典型用法代码示例。如果您正苦于以下问题:Python wx.DD_DEFAULT_STYLE属性的具体用法?Python wx.DD_DEFAULT_STYLE怎么用?Python wx.DD_DEFAULT_STYLE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在wx的用法示例。


在下文中一共展示了wx.DD_DEFAULT_STYLE属性的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: dirBrowser

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DD_DEFAULT_STYLE [as 别名]
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 
开发者ID:collingreen,项目名称:chronolapse,代码行数:20,代码来源:chronolapse.py

示例2: onBrowseFolder

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DD_DEFAULT_STYLE [as 别名]
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() 
开发者ID:newville,项目名称:pyshortcuts,代码行数:20,代码来源:wxgui.py

示例3: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DD_DEFAULT_STYLE [as 别名]
def __init__(self, parent, *args, **kwargs):
    wx.DirDialog.__init__(self, parent, 'Select Directory', style=wx.DD_DEFAULT_STYLE) 
开发者ID:ME-ICA,项目名称:me-ica,代码行数:4,代码来源:widget_pack.py

示例4: OnChangeMirror

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DD_DEFAULT_STYLE [as 别名]
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() 
开发者ID:hschauhan,项目名称:gosync,代码行数:14,代码来源:GoSyncSettingPage.py

示例5: on_button

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DD_DEFAULT_STYLE [as 别名]
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) 
开发者ID:lrq3000,项目名称:pyFileFixity,代码行数:9,代码来源:choosers.py

示例6: select_working_dir

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DD_DEFAULT_STYLE [as 别名]
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() 
开发者ID:DeepLabCut,项目名称:DeepLabCut,代码行数:12,代码来源:create_new_project.py

示例7: dialog

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DD_DEFAULT_STYLE [as 别名]
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 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:8,代码来源:__init__.py

示例8: directory_dialog

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DD_DEFAULT_STYLE [as 别名]
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 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:8,代码来源:__init__.py

示例9: get_save_in

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DD_DEFAULT_STYLE [as 别名]
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) 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:9,代码来源:SettingsWindow.py

示例10: load_file

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DD_DEFAULT_STYLE [as 别名]
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() 
开发者ID:RMPR,项目名称:atbswp,代码行数:15,代码来源:control.py

示例11: on_widget_path

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DD_DEFAULT_STYLE [as 别名]
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 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:9,代码来源:preferencesdialog.py

示例12: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DD_DEFAULT_STYLE [as 别名]
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 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:12,代码来源:application.py

示例13: Get_Directory

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DD_DEFAULT_STYLE [as 别名]
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()
#---------------------------------------------------------------- 
开发者ID:peckhams,项目名称:topoflow,代码行数:16,代码来源:GUI_utils.py


注:本文中的wx.DD_DEFAULT_STYLE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。