1998-05-20 14:25:30 +00:00
|
|
|
\section{\class{wxSingleChoiceDialog}}\label{wxsinglechoicedialog}
|
|
|
|
|
2004-06-30 12:32:21 +00:00
|
|
|
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.
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxDialog}{wxdialog}\\
|
|
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 20:41:29 +00:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/choicdlg.h>
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\wxheading{See also}
|
|
|
|
|
2004-06-30 12:32:21 +00:00
|
|
|
\helpref{wxSingleChoiceDialog overview}{wxsinglechoicedialogoverview},
|
|
|
|
\helpref{wxMultiChoiceDialog}{wxmultichoicedialog}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
2004-09-23 15:41:43 +00:00
|
|
|
\membersection{wxSingleChoiceDialog::wxSingleChoiceDialog}\label{wxsinglechoicedialogctor}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\func{}{wxSingleChoiceDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp
|
1998-06-14 12:11:50 +00:00
|
|
|
\param{const wxString\& }{caption}, \param{int }{n}, \param{const wxString* }{choices},\rtfsp
|
2004-06-30 12:32:21 +00:00
|
|
|
\param{void**}{ clientData = NULL}, \param{long }{style = wxCHOICEDLG\_STYLE},\rtfsp
|
1998-05-20 14:25:30 +00:00
|
|
|
\param{const wxPoint\& }{pos = wxDefaultPosition}}
|
|
|
|
|
2004-06-30 12:32:21 +00:00
|
|
|
\func{}{wxSingleChoiceDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp
|
|
|
|
\param{const wxString\& }{caption}, \param{const wxArrayString\& }{choices},\rtfsp
|
|
|
|
\param{void**}{ clientData = NULL}, \param{long }{style = wxCHOICEDLG\_STYLE},\rtfsp
|
|
|
|
\param{const wxPoint\& }{pos = wxDefaultPosition}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
2004-06-30 12:32:21 +00:00
|
|
|
Constructor, taking an array of wxString choices and optional client data.
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\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.}
|
|
|
|
|
2004-06-30 12:32:21 +00:00
|
|
|
\docparam{clientData}{An array of client data to be associated with the items.
|
|
|
|
See \helpref{GetSelectionClientData}{wxsinglechoicedialoggetselectionclientdata}.}
|
|
|
|
|
|
|
|
\docparam{style}{A dialog style (bitlist) containing flags chosen from standard
|
|
|
|
dialog styles and the following:
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\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}
|
2004-06-30 12:32:21 +00:00
|
|
|
The default value is equivalent to {\bf wxDEFAULT\_DIALOG\_STYLE \pipe wxRESIZE\_BORDER \pipe wxOK \pipe wxCANCEL \pipe wxCENTRE}.
|
1998-05-20 14:25:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
\docparam{pos}{Dialog position. Not Windows.}
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
Use \helpref{wxSingleChoiceDialog::ShowModal}{wxsinglechoicedialogshowmodal} to show the dialog.
|
|
|
|
|
2002-06-07 20:15:28 +00:00
|
|
|
\pythonnote{For Python the two parameters {\tt n} and {\tt choices} are collapsed
|
2000-02-02 19:30:09 +00:00
|
|
|
into a single parameter {\tt choices} which is expected to be a Python
|
2000-02-02 04:46:41 +00:00
|
|
|
list of strings.}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
2001-04-14 19:46:05 +00:00
|
|
|
\perlnote{In wxPerl there is just an array reference in place of {\tt n}
|
|
|
|
and {\tt choices}, and the client data array, if present, must have the
|
|
|
|
same length as the choices array.}
|
|
|
|
|
2004-09-23 15:41:43 +00:00
|
|
|
\membersection{wxSingleChoiceDialog::GetSelection}\label{wxsinglechoicedialoggetselection}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\constfunc{int}{GetSelection}{\void}
|
|
|
|
|
|
|
|
Returns the index of selected item.
|
|
|
|
|
2004-06-30 12:32:21 +00:00
|
|
|
\membersection{wxSingleChoiceDialog::GetSelectionClientData}\label{wxsinglechoicedialoggetselectionclientdata}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\constfunc{char*}{GetSelectionClientData}{\void}
|
|
|
|
|
|
|
|
Returns the client data associated with the selection.
|
|
|
|
|
2004-09-23 15:41:43 +00:00
|
|
|
\membersection{wxSingleChoiceDialog::GetStringSelection}\label{wxsinglechoicedialoggetstringselection}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\constfunc{wxString}{GetStringSelection}{\void}
|
|
|
|
|
|
|
|
Returns the selected string.
|
|
|
|
|
2004-09-23 15:41:43 +00:00
|
|
|
\membersection{wxSingleChoiceDialog::SetSelection}\label{wxsinglechoicedialogsetselection}
|
1999-12-15 00:31:58 +00:00
|
|
|
|
|
|
|
\constfunc{void}{SetSelection}{\param{int}{ selection}}
|
|
|
|
|
|
|
|
Sets the index of the initially selected item.
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxSingleChoiceDialog::ShowModal}\label{wxsinglechoicedialogshowmodal}
|
|
|
|
|
|
|
|
\func{int}{ShowModal}{\void}
|
|
|
|
|
|
|
|
Shows the dialog, returning either wxID\_OK or wxID\_CANCEL.
|
|
|
|
|