wxCommandEvent

wxCommandEvent

wxCommandEvent
Functions for wxCommandEvent class

This event class contains information about command events, which originate from a variety of simple controls.

Note that wxCommandEvents and wxCommandEvent-derived event classes by default and unlike other wxEvent-derived classes propagate upward from the source window (the window which emits the event) up to the first parent which processes the event. Be sure to read overview_events_propagation.

More complex controls, such as wxTreeCtrl, have separate command event classes.

This class is derived (and can use functions) from: wxEvent

wxWidgets docs: wxCommandEvent

Use wxEvtHandler:connect/3 with wxCommandEventType to subscribe to events of this type.

Types

Returns client object pointer for a listbox or choice selection event (not valid for a deselection).

Types

Returns extra information dependent on the event objects type.

If the event comes from a listbox selection, it is a boolean determining whether the event was a selection (true) or a deselection (false). A listbox deselection only occurs for multiple-selection boxes, and in this case the index and string values are indeterminate and the listbox must be examined by the application.

Types

Returns the integer identifier corresponding to a listbox, choice or radiobox selection (only if the event was a selection, not a deselection), or a boolean value representing the value of a checkbox.

For a menu item, this method returns -1 if the item is not checkable or a boolean value (true or false) for checkable items indicating the new state of the item.

Types

Returns item index for a listbox or choice selection event (not valid for a deselection).

Types

Returns item string for a listbox or choice selection event.

If one or several items have been deselected, returns the index of the first deselected item. If some items have been selected and others deselected at the same time, it will return the index of the first selected item.

Types

This method can be used with checkbox and menu events: for the checkboxes, the method returns true for a selection event and false for a deselection one.

For the menu events, this method indicates if the menu item just has become checked or unchecked (and thus only makes sense for checkable menu items).

Notice that this method cannot be used with wxCheckListBox currently.

Types

For a listbox or similar event, returns true if it is a selection, false if it is a deselection.

If some items have been selected and others deselected at the same time, it will return true.