1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxSingleChoiceDialog}}\label{wxsinglechoicedialog}
|
|
|
|
|
|
|
|
This class represents a dialog that shows a list of strings, and allows
|
|
|
|
the user to select one. Double-clicking on a list item is equivalent to single-clicking
|
|
|
|
and then pressing OK.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxDialog}{wxdialog}\\
|
|
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/choicdlg.h>
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSingleChoiceDialog overview}{wxsinglechoicedialogoverview}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxSingleChoiceDialog::wxSingleChoiceDialog}\label{wxsinglechoicedialogconstr}
|
|
|
|
|
|
|
|
\func{}{wxSingleChoiceDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp
|
1998-06-14 08:11:50 -04:00
|
|
|
\param{const wxString\& }{caption}, \param{int }{n}, \param{const wxString* }{choices},\rtfsp
|
1999-12-14 19:31:58 -05:00
|
|
|
\param{void**}{ clientData = NULL}, \param{long }{style = wxOK \pipe wxCANCEL \pipe wxCENTRE},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxPoint\& }{pos = wxDefaultPosition}}
|
|
|
|
|
|
|
|
Constructor, taking an array of wxString choices and optional client data.
|
|
|
|
|
|
|
|
\func{}{wxSingleChoiceDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp
|
|
|
|
\param{const wxString\& }{caption}, \param{const wxStringList\& }{choices},\rtfsp
|
1999-12-14 19:31:58 -05:00
|
|
|
\param{void**}{ clientData = NULL}, \param{long }{style = wxOK \pipe wxCANCEL \pipe wxCENTRE},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxPoint\& }{pos = wxDefaultPosition}}
|
|
|
|
|
|
|
|
Constructor, taking a string list and optional client data.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{parent}{Parent window.}
|
|
|
|
|
|
|
|
\docparam{message}{Message to show on the dialog.}
|
|
|
|
|
|
|
|
\docparam{caption}{The dialog caption.}
|
|
|
|
|
|
|
|
\docparam{n}{The number of choices.}
|
|
|
|
|
|
|
|
\docparam{choices}{An array of strings, or a string list, containing the choices.}
|
|
|
|
|
|
|
|
\docparam{style}{A dialog style (bitlist) containing flags chosen from the following:
|
|
|
|
|
|
|
|
\twocolwidtha{5cm}
|
|
|
|
\begin{twocollist}
|
|
|
|
\twocolitem{{\bf wxOK}}{Show an OK button.}
|
|
|
|
\twocolitem{{\bf wxCANCEL}}{Show a Cancel button.}
|
|
|
|
\twocolitem{{\bf wxCENTRE}}{Centre the message. Not Windows.}
|
|
|
|
\end{twocollist}
|
|
|
|
}
|
|
|
|
|
|
|
|
\docparam{pos}{Dialog position. Not Windows.}
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
Use \helpref{wxSingleChoiceDialog::ShowModal}{wxsinglechoicedialogshowmodal} to show the dialog.
|
|
|
|
|
2000-02-02 14:30:09 -05:00
|
|
|
\pythonnote{For Python the two parametes {\tt n} and {\tt choices} are collapsed
|
|
|
|
into a single parameter {\tt choices} which is expected to be a Python
|
2000-02-01 23:46:41 -05:00
|
|
|
list of strings.}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxSingleChoiceDialog::\destruct{wxSingleChoiceDialog}}
|
|
|
|
|
|
|
|
\func{}{\destruct{wxSingleChoiceDialog}}{\void}
|
|
|
|
|
|
|
|
Destructor.
|
|
|
|
|
|
|
|
\membersection{wxSingleChoiceDialog::GetSelection}
|
|
|
|
|
|
|
|
\constfunc{int}{GetSelection}{\void}
|
|
|
|
|
|
|
|
Returns the index of selected item.
|
|
|
|
|
|
|
|
\membersection{wxSingleChoiceDialog::GetSelectionClientData}
|
|
|
|
|
|
|
|
\constfunc{char*}{GetSelectionClientData}{\void}
|
|
|
|
|
|
|
|
Returns the client data associated with the selection.
|
|
|
|
|
|
|
|
\membersection{wxSingleChoiceDialog::GetStringSelection}
|
|
|
|
|
|
|
|
\constfunc{wxString}{GetStringSelection}{\void}
|
|
|
|
|
|
|
|
Returns the selected string.
|
|
|
|
|
1999-12-14 19:31:58 -05:00
|
|
|
\membersection{wxSingleChoiceDialog::SetSelection}
|
|
|
|
|
|
|
|
\constfunc{void}{SetSelection}{\param{int}{ selection}}
|
|
|
|
|
|
|
|
Sets the index of the initially selected item.
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\membersection{wxSingleChoiceDialog::ShowModal}\label{wxsinglechoicedialogshowmodal}
|
|
|
|
|
|
|
|
\func{int}{ShowModal}{\void}
|
|
|
|
|
|
|
|
Shows the dialog, returning either wxID\_OK or wxID\_CANCEL.
|
|
|
|
|