- A listbox is used to select one or more of a list of strings. The
- strings are displayed in a scrolling box, with the selected string(s)
- marked in reverse video. A listbox can be single selection (if an item
- is selected, the previous selection is removed) or multiple selection
+ A listbox is used to select one or more of a list of strings.
+
+ The strings are displayed in a scrolling box, with the selected string(s)
+ marked in reverse video. A listbox can be single selection (if an item is
+ selected, the previous selection is removed) or multiple selection
- A listbox callback gets an event wxEVT_COMMAND_LISTBOX_SELECTED for
- single clicks, and wxEVT_COMMAND_LISTBOX_DOUBLECLICKED for double clicks.
+ A listbox callback gets an event @c wxEVT_COMMAND_LISTBOX_SELECTED for
+ single clicks, and @c wxEVT_COMMAND_LISTBOX_DOUBLECLICKED for double clicks.
- Multiple-selection list: the user can toggle multiple items on and
- off. This is the same as wxLB_EXTENDED in wxGTK2 port.
+ Multiple-selection list: the user can toggle multiple items on and off.
+ This is the same as wxLB_EXTENDED in wxGTK2 port.
@style{wxLB_EXTENDED}
Extended-selection list: the user can extend the selection by using
@c SHIFT or @c CTRL keys together with the cursor movement keys or
@style{wxLB_EXTENDED}
Extended-selection list: the user can extend the selection by using
@c SHIFT or @c CTRL keys together with the cursor movement keys or
@beginEventTable{wxCommandEvent}
@event{EVT_LISTBOX(id, func)}
Process a wxEVT_COMMAND_LISTBOX_SELECTED event, when an item on the
list is selected or the selection changes.
@event{EVT_LISTBOX_DCLICK(id, func)}
@beginEventTable{wxCommandEvent}
@event{EVT_LISTBOX(id, func)}
Process a wxEVT_COMMAND_LISTBOX_SELECTED event, when an item on the
list is selected or the selection changes.
@event{EVT_LISTBOX_DCLICK(id, func)}
@see wxEditableListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent
*/
@see wxEditableListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent
*/
wxListBox(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
wxListBox(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
- @param choices
- An array of strings with which to initialise the control.
- @param style
- Window style. See wxListBox.
+ See the other wxListBox() constructor; the only difference is that
+ this overload takes a wxArrayString instead of a pointer to an array
+ of wxString.
wxListBox(wxWindow* parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
wxListBox(wxWindow* parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- const wxString& name = "listBox");
- bool Create(wxWindow* parent, wxWindowID id,
+ const wxString& name = wxListBoxNameStr);
+ bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
- Returns the item located at @e point, or @c wxNOT_FOUND if there
- is no item located at @e point.
+ Returns the item located at @a point, or @c wxNOT_FOUND if there
+ is no item located at @a point.
Point of item (in client coordinates) to obtain
@return Item located at point, or wxNOT_FOUND if unimplemented or the
Point of item (in client coordinates) to obtain
@return Item located at point, or wxNOT_FOUND if unimplemented or the
Position before which to insert the items: if pos is 0 the
items will be inserted in the beginning of the listbox
*/
Position before which to insert the items: if pos is 0 the
items will be inserted in the beginning of the listbox
*/
items will be inserted in the beginning of the listbox
*/
void InsertItems(const wxArrayString& items,
items will be inserted in the beginning of the listbox
*/
void InsertItems(const wxArrayString& items,
- Clears the list box and adds the given strings to it. You may
- free the array from the calling program after this method
+ Clears the list box and adds the given strings to it.
+ You may free the array from the calling program after this method