.\" This is a wxWidgets manpage page generated from the XML docs .TH wxChoice 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxChoice \- Choice control (a combobox without the editable area) .SH DESCRIPTION A choice item is used to select one of a list of strings. Unlike a listbox, only the selection is visible until the user pulls down the menu of choices. .SH "PARENTS" wxControlWithItems wxControl wxWindow wxEvtHandler wxObject .SH "INCLUDE FILES" wx/choice.h .SH MEMBERS .SS wxChoice () Default constructor. .SS wxChoice (wxWindow *parentwxWindowID idconst wxPoint& posconst wxSize& sizeint nconst wxString choices[]long style = 0const wxValidator& validator = wxDefaultValidatorconst wxString& name = ``choice") .SS wxChoice (wxWindow *parentwxWindowID idconst wxPoint& posconst wxSize& sizeconst wxArrayString& choiceslong style = 0const wxValidator& validator = wxDefaultValidatorconst wxString& name = ``choice") .SS ~wxChoice () Destructor, destroying the choice item. .SS bool Create (wxWindow *parentwxWindowID idconst wxPoint& posconst wxSize& sizeint nconst wxString choices[]long style = 0const wxValidator& validator = wxDefaultValidatorconst wxString& name = ``choice") .SS bool Create (wxWindow *parentwxWindowID idconst wxPoint& posconst wxSize& sizeconst wxArrayString& choiceslong style = 0const wxValidator& validator = wxDefaultValidatorconst wxString& name = ``choice") Creates the choice for two-step construction. See wxChoice::wxChoice . .SS void Delete (int n) Deletes the item with the given index from the control. .SS int GetColumns () Gets the number of columns in this choice item. .SS int GetCurrentSelection () Unlike GetSelection which only returns the accepted selection value, i.e. the selection in the control once the user closes the dropdown list, this function returns the current selection. That is, while the dropdown list is shown, it returns the currently selected item in it. When it is not shown, its result is the same as for the other function. \newsince{2.6.2} (before this version GetSelection itself behaved like this). .SS void SetColumns (int n = 1) Sets the number of columns in this choice item. .SH "WINDOW STYLES" .SH EVENTS .SS EVT_CHOICE(id, func) Process a wxEVT_COMMAND_CHOICE_SELECTED event, when an item on the list is selected. .SH "SEE ALSO" wxControlWithItems wxControl wxWindow wxEvtHandler wxObject wxListBox wxComboBox , wxCommandEvent .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.