]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/sngchdlg.tex
added <EM>, <CITE> and <STRONG> tags; now use separate handlers for <B>,<I>,<TT>
[wxWidgets.git] / docs / latex / wx / sngchdlg.tex
1 \section{\class{wxSingleChoiceDialog}}\label{wxsinglechoicedialog}
2
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
5 and then pressing OK.
6
7 \wxheading{Derived from}
8
9 \helpref{wxDialog}{wxdialog}\\
10 \helpref{wxWindow}{wxwindow}\\
11 \helpref{wxEvtHandler}{wxevthandler}\\
12 \helpref{wxObject}{wxobject}
13
14 \wxheading{Include files}
15
16 <wx/choicdlg.h>
17
18 \wxheading{See also}
19
20 \helpref{wxSingleChoiceDialog overview}{wxsinglechoicedialogoverview}
21
22 \latexignore{\rtfignore{\wxheading{Members}}}
23
24 \membersection{wxSingleChoiceDialog::wxSingleChoiceDialog}\label{wxsinglechoicedialogconstr}
25
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}}
30
31 Constructor, taking an array of wxString choices and optional client data.
32
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}}
37
38 Constructor, taking a string list and optional client data.
39
40 \wxheading{Parameters}
41
42 \docparam{parent}{Parent window.}
43
44 \docparam{message}{Message to show on the dialog.}
45
46 \docparam{caption}{The dialog caption.}
47
48 \docparam{n}{The number of choices.}
49
50 \docparam{choices}{An array of strings, or a string list, containing the choices.}
51
52 \docparam{style}{A dialog style (bitlist) containing flags chosen from the following:
53
54 \twocolwidtha{5cm}
55 \begin{twocollist}
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.}
59 \end{twocollist}
60 }
61
62 \docparam{pos}{Dialog position. Not Windows.}
63
64 \wxheading{Remarks}
65
66 Use \helpref{wxSingleChoiceDialog::ShowModal}{wxsinglechoicedialogshowmodal} to show the dialog.
67
68
69 \membersection{wxSingleChoiceDialog::\destruct{wxSingleChoiceDialog}}
70
71 \func{}{\destruct{wxSingleChoiceDialog}}{\void}
72
73 Destructor.
74
75 \membersection{wxSingleChoiceDialog::GetSelection}
76
77 \constfunc{int}{GetSelection}{\void}
78
79 Returns the index of selected item.
80
81 \membersection{wxSingleChoiceDialog::GetSelectionClientData}
82
83 \constfunc{char*}{GetSelectionClientData}{\void}
84
85 Returns the client data associated with the selection.
86
87 \membersection{wxSingleChoiceDialog::GetStringSelection}
88
89 \constfunc{wxString}{GetStringSelection}{\void}
90
91 Returns the selected string.
92
93 \membersection{wxSingleChoiceDialog::SetSelection}
94
95 \constfunc{void}{SetSelection}{\param{int}{ selection}}
96
97 Sets the index of the initially selected item.
98
99 \membersection{wxSingleChoiceDialog::ShowModal}\label{wxsinglechoicedialogshowmodal}
100
101 \func{int}{ShowModal}{\void}
102
103 Shows the dialog, returning either wxID\_OK or wxID\_CANCEL.
104