.\" This is a wxWidgets manpage page generated from the XML docs .TH wxComboBox 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxComboBox \- A choice with an editable area .SH DESCRIPTION A combobox is like a combination of an edit control and a listbox. It can be displayed as static list with editable or read-only text field; or a drop-down list with text field; or a drop-down list without a text field. A combobox permits a single selection only. Combobox items are numbered from zero. .SH "PARENTS" wxControlWithItems wxControl wxWindow wxEvtHandler wxObject .SH "INCLUDE FILES" wx/combobox.h .SH MEMBERS .SS wxComboBox () Default constructor. .SS wxComboBox (wxWindow* parentwxWindowID idconst wxString& value = ``"const wxPoint& pos = wxDefaultPositionconst wxSize& size = wxDefaultSizeint nconst wxString choices[]long style = 0const wxValidator& validator = wxDefaultValidatorconst wxString& name = ``comboBox") .SS wxComboBox (wxWindow* parentwxWindowID idconst wxString& valueconst wxPoint& posconst wxSize& sizeconst wxArrayString& choiceslong style = 0const wxValidator& validator = wxDefaultValidatorconst wxString& name = ``comboBox") .SS ~wxComboBox () Destructor, destroying the combobox. .SS bool Create (wxWindow* parentwxWindowID idconst wxString& value = ``"const wxPoint& pos = wxDefaultPositionconst wxSize& size = wxDefaultSizeint nconst wxString choices[]long style = 0const wxValidator& validator = wxDefaultValidatorconst wxString& name = ``comboBox") .SS bool Create (wxWindow* parentwxWindowID idconst wxString& valueconst wxPoint& posconst wxSize& sizeconst wxArrayString& choiceslong style = 0const wxValidator& validator = wxDefaultValidatorconst wxString& name = ``comboBox") Creates the combobox for two-step construction. Derived classes should call or replace this function. See wxComboBox::wxComboBox for further details. .SS bool CanCopy () Returns true if the combobox is editable and there is a text selection to copy to the clipboard. Only available on Windows. .SS bool CanCut () Returns true if the combobox is editable and there is a text selection to copy to the clipboard. Only available on Windows. .SS bool CanPaste () Returns true if the combobox is editable and there is text on the clipboard that can be pasted into the text field. Only available on Windows. .SS bool CanRedo () Returns true if the combobox is editable and the last undo can be redone. Only available on Windows. .SS bool CanUndo () Returns true if the combobox is editable and the last edit can be undone. Only available on Windows. .SS void Copy () Copies the selected text to the clipboard. .SS void Cut () Copies the selected text to the clipboard and removes the selection. .SS long GetInsertionPoint () Returns the insertion point for the combobox's text field. .SS virtual wxTextPos GetLastPosition () Returns the last position in the combobox text field. .SS wxString GetValue () Returns the current value in the combobox text field. .SS void Paste () Pastes text from the clipboard to the text field. .SS void Redo () Redoes the last undo in the text field. Windows only. .SS void Replace (long fromlong toconst wxString& text) Replaces the text between two positions with the given text, in the combobox text field. .SS void Remove (long fromlong to) Removes the text between the two positions in the combobox text field. .SS void SetInsertionPoint (long pos) Sets the insertion point in the combobox text field. .SS void SetInsertionPointEnd () Sets the insertion point at the end of the combobox text field. .SS void SetSelection (long fromlong to) Selects the text between the two positions, in the combobox text field. .SS void SetValue (const wxString& text) Sets the text for the combobox text field. NB: For a combobox with wxCB_READONLY style the string must be in the combobox choices list, otherwise the call to SetValue() is ignored. .SS void Undo () Undoes the last edit in the text field. Windows only. .SH "WINDOW STYLES" .SS wxCB_SIMPLE Creates a combobox with a permanently displayed list. Windows only. .SS wxCB_DROPDOWN Creates a combobox with a drop-down list. .SS wxCB_READONLY wxCB_READONLY .SS wxCB_SORT Sorts the entries in the list alphabetically. .SH EVENTS .SS EVT_COMBOBOX(id, func) Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on the list is selected. Note that calling GetValue returns the new value of selection. .SS EVT_TEXT(id, func) Process a wxEVT_COMMAND_TEXT_UPDATED event, when the combobox text changes. .SS EVT_TEXT_ENTER(id, func) Process a wxEVT_COMMAND_TEXT_ENTER event, when is pressed in the combobox. .SH "SEE ALSO" wxControlWithItems wxControl wxWindow wxEvtHandler wxObject wxListBox wxTextCtrl wxChoice , 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.