1 \section{\class{wxSingleChoiceDialog
}}\label{wxsinglechoicedialog
}
3 This class represents a dialog that shows a list of strings, and allows
4 the user to select one. Double-clicking on a list item is equivalent to single-clicking
7 \wxheading{Derived from
}
9 \helpref{wxDialog
}{wxdialog
}\\
10 \helpref{wxWindow
}{wxwindow
}\\
11 \helpref{wxEvtHandler
}{wxevthandler
}\\
12 \helpref{wxObject
}{wxobject
}
14 \wxheading{Include files
}
20 \helpref{wxSingleChoiceDialog overview
}{wxsinglechoicedialogoverview
}
22 \latexignore{\rtfignore{\wxheading{Members
}}}
24 \membersection{wxSingleChoiceDialog::wxSingleChoiceDialog
}\label{wxsinglechoicedialogconstr
}
26 \func{}{wxSingleChoiceDialog
}{\param{wxWindow*
}{parent
},
\param{const wxString\&
}{message
},
\rtfsp
27 \param{const wxString\&
}{caption
},
\param{int
}{n
},
\param{const wxString*
}{choices
},
\rtfsp
28 \param{void**
}{ clientData = NULL
},
\param{long
}{style = wxOK
\pipe wxCANCEL
\pipe wxCENTRE
},
\rtfsp
29 \param{const wxPoint\&
}{pos = wxDefaultPosition
}}
31 Constructor, taking an array of wxString choices and optional client data.
33 %\func{}{wxSingleChoiceDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp
34 %\param{const wxString\& }{caption}, \param{const wxStringList\& }{choices},\rtfsp
35 %\param{void**}{ clientData = NULL}, \param{long }{style = wxOK \pipe wxCANCEL \pipe wxCENTRE},\rtfsp
36 %\param{const wxPoint\& }{pos = wxDefaultPosition}}
38 %Constructor, taking a string list and optional client data.
40 \wxheading{Parameters
}
42 \docparam{parent
}{Parent window.
}
44 \docparam{message
}{Message to show on the dialog.
}
46 \docparam{caption
}{The dialog caption.
}
48 \docparam{n
}{The number of choices.
}
50 \docparam{choices
}{An array of strings, or a string list, containing the choices.
}
52 \docparam{style
}{A dialog style (bitlist) containing flags chosen from the following:
56 \twocolitem{{\bf wxOK
}}{Show an OK button.
}
57 \twocolitem{{\bf wxCANCEL
}}{Show a Cancel button.
}
58 \twocolitem{{\bf wxCENTRE
}}{Centre the message. Not Windows.
}
62 \docparam{pos
}{Dialog position. Not Windows.
}
66 Use
\helpref{wxSingleChoiceDialog::ShowModal
}{wxsinglechoicedialogshowmodal
} to show the dialog.
68 \pythonnote{For Python the two parameters
{\tt n
} and
{\tt choices
} are collapsed
69 into a single parameter
{\tt choices
} which is expected to be a Python
72 \perlnote{In wxPerl there is just an array reference in place of
{\tt n
}
73 and
{\tt choices
}, and the client data array, if present, must have the
74 same length as the choices array.
}
76 \membersection{wxSingleChoiceDialog::
\destruct{wxSingleChoiceDialog
}}
78 \func{}{\destruct{wxSingleChoiceDialog
}}{\void}
82 \membersection{wxSingleChoiceDialog::GetSelection
}
84 \constfunc{int
}{GetSelection
}{\void}
86 Returns the index of selected item.
88 \membersection{wxSingleChoiceDialog::GetSelectionClientData
}
90 \constfunc{char*
}{GetSelectionClientData
}{\void}
92 Returns the client data associated with the selection.
94 \membersection{wxSingleChoiceDialog::GetStringSelection
}
96 \constfunc{wxString
}{GetStringSelection
}{\void}
98 Returns the selected string.
100 \membersection{wxSingleChoiceDialog::SetSelection
}
102 \constfunc{void
}{SetSelection
}{\param{int
}{ selection
}}
104 Sets the index of the initially selected item.
106 \membersection{wxSingleChoiceDialog::ShowModal
}\label{wxsinglechoicedialogshowmodal
}
108 \func{int
}{ShowModal
}{\void}
110 Shows the dialog, returning either wxID
\_OK or wxID
\_CANCEL.