wxsinglechoicedialogthis 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. derived from
wxdialog include files <wx/choicdlg.h> see also wxsinglechoicedialog overview, wxmultichoicedialog members
wxsinglechoicedialog::wxsinglechoicedialog
wxsinglechoicedialog::wxsinglechoicedialogwxsinglechoicedialog(wxwindow* parent, const wxstring& message, const wxstring& caption, int n, const wxstring* choices, void** clientdata = null, long style = wxchoicedlg_style, const wxpoint& pos = wxdefaultposition) wxsinglechoicedialog(wxwindow* parent, const wxstring& message, const wxstring& caption, const wxarraystring& choices, void** clientdata = null, long style = wxchoicedlg_style, const wxpoint& pos = wxdefaultposition) constructor, taking an array of wxstring choices and optional client data. parameters parent
message
caption
n
choices
clientdata
style
pos
remarks use wxsinglechoicedialog::showmodal to show the dialog. wxpython note: for python the two parameters n and choices are collapsed into a single parameter choices which is expected to be a python list of strings. wxperl note: in wxperl there is just an array reference in place of n and choices, and the client data array, if present, must have the same length as the choices array.
wxsinglechoicedialog::getselectionint getselection() const returns the index of selected item.
wxsinglechoicedialog::getselectionclientdatachar* getselectionclientdata() const returns the client data associated with the selection.
wxsinglechoicedialog::getstringselectionwxstring getstringselection() const returns the selected string.
wxsinglechoicedialog::setselectionvoid setselection(int selection) const sets the index of the initially selected item.
wxsinglechoicedialog::showmodalint showmodal() shows the dialog, returning either wxid_ok or wxid_cancel.
|