wx.DirDialog

Inheritance diagram for wx.DirDialog:



Description

This class represents the directory chooser dialog.

Note

on Windows the new directory button is only available with recent versions of the common dialogs.

See also

wx.FileDialog

Window Styles

Window Style Description
wx.DD_DEFAULT_STYLE Equivalent to a combination of wx.DEFAULT_DIALOG_STYLE and wx.RESIZE_BORDER (the last one is not used under wxWinCE).
wx.DD_DIR_MUST_EXIST The dialog will allow the user to choose only an existing folder. When this style is not given, a “Create new directory” button is added to the dialog (on Windows) or some other way is provided to the user to type the name of a new folder.
wx.DD_CHANGE_DIR Change the current working directory to the directory chosen by the user.

Properties Summary

Class API

Methods

__init__(parent, message=wx.DirSelectorPromptStr, defaultPath="", style=wx.DD_DEFAULT_STYLE, pos=wx.DefaultPosition, size=wx.DefaultSize, name=wx.DirDialogNameStr)

Constructor. Use ShowModal method to show the dialog.

Parameters:


Returns:

wx.DirDialog


GetMessage()

Returns the message that will be displayed on the dialog.


Returns:

string


GetPath()

Returns the default or user-selected path.


Returns:

string


SetMessage(message)

Sets the message that will be displayed on the dialog.

Parameters:

  • message (string)

SetPath(path)

Sets the default path.

Parameters:

  • path (string)

ShowModal()

Shows the dialog, returning one of wx.ID_OK or wx.ID_CANCEL.


Returns:

int


Properties

Message
See GetMessage and SetMessage
Path
See GetPath and SetPath