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
}
16 \helpref{wxSingleChoiceDialog overview
}{wxsinglechoicedialogoverview
}
18 \latexignore{\rtfignore{\wxheading{Members
}}}
20 \membersection{wxSingleChoiceDialog::wxSingleChoiceDialog
}\label{wxsinglechoicedialogconstr
}
22 \func{}{wxSingleChoiceDialog
}{\param{wxWindow*
}{parent
},
\param{const wxString\&
}{message
},
\rtfsp
23 \param{const wxString\&
}{caption
},
\param{int
}{n
},
\param{const wxString*
}{choices
},
\rtfsp
24 \param{char**
}{ clientData = NULL
},
\param{long
}{style = wxOK
\pipe wxCANCEL
\pipe wxCENTRE
},
\rtfsp
25 \param{const wxPoint\&
}{pos = wxDefaultPosition
}}
27 Constructor, taking an array of wxString choices and optional client data.
29 \func{}{wxSingleChoiceDialog
}{\param{wxWindow*
}{parent
},
\param{const wxString\&
}{message
},
\rtfsp
30 \param{const wxString\&
}{caption
},
\param{const wxStringList\&
}{choices
},
\rtfsp
31 \param{char**
}{ clientData = NULL
},
\param{long
}{style = wxOK
\pipe wxCANCEL
\pipe wxCENTRE
},
\rtfsp
32 \param{const wxPoint\&
}{pos = wxDefaultPosition
}}
34 Constructor, taking a string list and optional client data.
36 \wxheading{Parameters
}
38 \docparam{parent
}{Parent window.
}
40 \docparam{message
}{Message to show on the dialog.
}
42 \docparam{caption
}{The dialog caption.
}
44 \docparam{n
}{The number of choices.
}
46 \docparam{choices
}{An array of strings, or a string list, containing the choices.
}
48 \docparam{style
}{A dialog style (bitlist) containing flags chosen from the following:
52 \twocolitem{{\bf wxOK
}}{Show an OK button.
}
53 \twocolitem{{\bf wxCANCEL
}}{Show a Cancel button.
}
54 \twocolitem{{\bf wxCENTRE
}}{Centre the message. Not Windows.
}
58 \docparam{pos
}{Dialog position. Not Windows.
}
62 Use
\helpref{wxSingleChoiceDialog::ShowModal
}{wxsinglechoicedialogshowmodal
} to show the dialog.
65 \membersection{wxSingleChoiceDialog::
\destruct{wxSingleChoiceDialog
}}
67 \func{}{\destruct{wxSingleChoiceDialog
}}{\void}
71 \membersection{wxSingleChoiceDialog::GetSelection
}
73 \constfunc{int
}{GetSelection
}{\void}
75 Returns the index of selected item.
77 \membersection{wxSingleChoiceDialog::GetSelectionClientData
}
79 \constfunc{char*
}{GetSelectionClientData
}{\void}
81 Returns the client data associated with the selection.
83 \membersection{wxSingleChoiceDialog::GetStringSelection
}
85 \constfunc{wxString
}{GetStringSelection
}{\void}
87 Returns the selected string.
89 \membersection{wxSingleChoiceDialog::ShowModal
}\label{wxsinglechoicedialogshowmodal
}
91 \func{int
}{ShowModal
}{\void}
93 Shows the dialog, returning either wxID
\_OK or wxID
\_CANCEL.