1 \section{\class{wxDirDialog
}}\label{wxdirdialog
}
3 This class represents the directory chooser dialog.
5 \wxheading{Derived from
}
7 \helpref{wxDialog
}{wxdialog
}\\
8 \helpref{wxWindow
}{wxwindow
}\\
9 \helpref{wxEvtHandler
}{wxevthandler
}\\
10 \helpref{wxObject
}{wxobject
}
12 \wxheading{Include files
}
18 \helpref{wxCore
}{librarieslist
}
20 \wxheading{Window styles
}
22 \begin{twocollist
}\itemsep=
0pt
23 \twocolitem{\windowstyle{wxDD
\_DEFAULT\_STYLE}}{Equivalent to a combination of wxDEFAULT
\_DIALOG\_STYLE and wxRESIZE
\_BORDER (the last one is not used under wxWinCE).
}
24 \twocolitem{\windowstyle{wxDD
\_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.
}
25 \twocolitem{\windowstyle{wxDD
\_CHANGE\_DIR}}{Change the current working directory to the directory chosen by the user.
}
28 {\bf NB:
} on Windows the new directory button is only available with recent versions of the common dialogs.
30 See also
\helpref{Generic window styles
}{windowstyles
}.
34 \helpref{wxDirDialog overview
}{wxdirdialogoverview
},
\helpref{wxFileDialog
}{wxfiledialog
}
36 \latexignore{\rtfignore{\wxheading{Members
}}}
38 \membersection{wxDirDialog::wxDirDialog
}\label{wxdirdialogctor
}
40 \func{}{wxDirDialog
}{\param{wxWindow*
}{parent
},
\param{const wxString\&
}{message = "Choose a directory"
},
\rtfsp
41 \param{const wxString\&
}{defaultPath = ""
},
\param{long
}{style = wxDD
\_DEFAULT\_STYLE},
\rtfsp
42 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\rtfsp
43 \param{const wxSize\&
}{size = wxDefaultSize
},
\rtfsp
44 \param{const wxString\&
}{name = "wxDirCtrl"
}}
46 Constructor. Use
\helpref{wxDirDialog::ShowModal
}{wxdirdialogshowmodal
} to show
49 \wxheading{Parameters
}
51 \docparam{parent
}{Parent window.
}
53 \docparam{message
}{Message to show on the dialog.
}
55 \docparam{defaultPath
}{The default path, or the empty string.
}
57 \docparam{style
}{The dialog style. See
\helpref{wxDirDialog
}{wxdirdialog
}}
59 \docparam{pos
}{Dialog position. Ignored under Windows.
}
61 \docparam{size
}{Dialog size. Ignored under Windows.
}
63 \docparam{name
}{The dialog name, not used.
}
65 \membersection{wxDirDialog::
\destruct{wxDirDialog
}}\label{wxdirdialogdtor
}
67 \func{}{\destruct{wxDirDialog
}}{\void}
71 \membersection{wxDirDialog::GetPath
}\label{wxdirdialoggetpath
}
73 \constfunc{wxString
}{GetPath
}{\void}
75 Returns the default or user-selected path.
77 \membersection{wxDirDialog::GetMessage
}\label{wxdirdialoggetmessage
}
79 \constfunc{wxString
}{GetMessage
}{\void}
81 Returns the message that will be displayed on the dialog.
83 \membersection{wxDirDialog::SetMessage
}\label{wxdirdialogsetmessage
}
85 \func{void
}{SetMessage
}{\param{const wxString\&
}{message
}}
87 Sets the message that will be displayed on the dialog.
89 \membersection{wxDirDialog::SetPath
}\label{wxdirdialogsetpath
}
91 \func{void
}{SetPath
}{\param{const wxString\&
}{path
}}
93 Sets the default path.
95 \membersection{wxDirDialog::ShowModal
}\label{wxdirdialogshowmodal
}
97 \func{int
}{ShowModal
}{\void}
99 Shows the dialog, returning wxID
\_OK if the user pressed OK, and wxID
\_CANCEL