]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/mltchdlg.tex
MF_BYCOMMAND is zero so don't try to test it
[wxWidgets.git] / docs / latex / wx / mltchdlg.tex
1 \section{\class{wxMultiChoiceDialog}}\label{wxmultichoicedialog}
2
3 This class represents a dialog that shows a list of strings, and allows
4 the user to select one or more.
5
6 \wxheading{Derived from}
7
8 \helpref{wxDialog}{wxdialog}\\
9 \helpref{wxWindow}{wxwindow}\\
10 \helpref{wxEvtHandler}{wxevthandler}\\
11 \helpref{wxObject}{wxobject}
12
13 \wxheading{Include files}
14
15 <wx/choicdlg.h>
16
17 \wxheading{See also}
18
19 \helpref{wxMultiChoiceDialog overview}{wxmultichoicedialogoverview},
20 \helpref{wxSingleChoiceDialog}{wxsinglechoicedialog}
21
22 \latexignore{\rtfignore{\wxheading{Members}}}
23
24 \membersection{wxMultiChoiceDialog::wxMultiChoiceDialog}\label{wxmultichoicedialogconstr}
25
26 \func{}{wxMultiChoiceDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp
27 \param{const wxString\& }{caption}, \param{int }{n}, \param{const wxString* }{choices}, \param{long }{style = wxCHOICEDLG\_STYLE},\rtfsp
28 \param{const wxPoint\& }{pos = wxDefaultPosition}}
29
30 \func{}{wxMultiChoiceDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp
31 \param{const wxString\& }{caption}, \param{const wxArrayString\& }{choices}, \param{long }{style = wxCHOICEDLG\_STYLE},\rtfsp
32 \param{const wxPoint\& }{pos = wxDefaultPosition}}
33
34 Constructor taking an array of wxString choices.
35
36 \wxheading{Parameters}
37
38 \docparam{parent}{Parent window.}
39
40 \docparam{message}{Message to show on the dialog.}
41
42 \docparam{caption}{The dialog caption.}
43
44 \docparam{n}{The number of choices.}
45
46 \docparam{choices}{An array of strings, or a string list, containing the choices.}
47
48 \docparam{style}{A dialog style (bitlist) containing flags chosen from standard
49 dialog styles and the following:
50
51 \twocolwidtha{5cm}
52 \begin{twocollist}
53 \twocolitem{{\bf wxOK}}{Show an OK button.}
54 \twocolitem{{\bf wxCANCEL}}{Show a Cancel button.}
55 \twocolitem{{\bf wxCENTRE}}{Centre the message. Not Windows.}
56 \end{twocollist}
57 The default value is equivalent to {\bf wxDEFAULT\_DIALOG\_STYLE \pipe wxRESIZE\_BORDER \pipe wxOK \pipe wxCANCEL \pipe wxCENTRE}.
58 }
59
60 \docparam{pos}{Dialog position. Not Windows.}
61
62 \wxheading{Remarks}
63
64 Use \helpref{wxMultiChoiceDialog::ShowModal}{wxmultichoicedialogshowmodal} to show the dialog.
65
66 \pythonnote{For Python the two parameters {\tt n} and {\tt choices} are collapsed
67 into a multi parameter {\tt choices} which is expected to be a Python
68 list of strings.}
69
70 \perlnote{In wxPerl there is just an array reference in place of {\tt n}.}
71
72 \membersection{wxMultiChoiceDialog::GetSelections}\label{wxmultichoicedialoggetselections}
73
74 \constfunc{wxArrayInt}{GetSelection}{\void}
75
76 Returns array with indexes of selected items.
77
78 \membersection{wxMultiChoiceDialog::SetSelections}\label{wxmultichoicedialogsetselections}
79
80 \constfunc{void}{SetSelections}{\param{const wxArrayInt\&}{ selections}}
81
82 Sets selected items from the array of selected items' indexes.
83
84 \membersection{wxMultiChoiceDialog::ShowModal}\label{wxmultichoicedialogshowmodal}
85
86 \func{int}{ShowModal}{\void}
87
88 Shows the dialog, returning either wxID\_OK or wxID\_CANCEL.
89