wxRuby Documentation Home

Wx::ListEvent

A list event holds information about events associated with ListCtrl objects.

Derived from

NotifyEvent

CommandEvent

Event

Object

Event table macros

To process input from a list control, use these event handler macros to direct input to member
functions that take a ListEvent argument.

evt_list_begin_drag(id) { | event | … } Begin dragging with the left mouse button.
evt_list_begin_rdrag(id) { | event | … } Begin dragging with the right mouse button.
evt_list_begin_label_edit(id) { | event | … } Begin editing a label. This can be prevented by calling Veto.
evt_list_end_label_edit(id) { | event | … } Finish editing a label. This can be prevented by calling Veto.
evt_list_delete_item(id) { | event | … } Delete an item.
evt_list_delete_all_items(id) { | event | … } Delete all items.
evt_list_item_selected(id) { | event | … } The item has been selected.
evt_list_item_deselected(id) { | event | … } The item has been deselected.
evt_list_item_activated(id) { | event | … } The item has been activated (ENTER or double click).
evt_list_item_focused(id) { | event | … } The currently focused item has changed.
evt_list_item_middle_click(id) { | event | … } The middle mouse button has been clicked on an item.
evt_list_item_right_click(id) { | event | … } The right mouse button has been clicked on an item.
evt_list_key_down(id) { | event | … } A key has been pressed.
evt_list_insert_item(id) { | event | … } An item has been inserted.
evt_list_col_click(id) { | event | … } A column (m_col) has been left-clicked.
evt_list_col_right_click(id) { | event | … } A column (m_col) (which can be $-1$ if the click occurred outside any column) has been right-clicked.
evt_list_col_begin_drag(id) { | event | … } The user started resizing a column – can be vetoed.
evt_list_col_dragging(id) { | event | … } The divider between columns is being dragged.
evt_list_col_end_drag(id) { | event | … } A column has been resized by the user.
evt_list_cache_hint(id) { | event | … } Prepare cache for a virtual list control

See also

ListCtrl

Methods

ListEvent.new

ListEvent.new(%(arg-type)TYPE% commandType = 0, Integer id = 0)

Constructor.

ListEvent#get_cache_from

Integer get_cache_from()

For EVT_LIST_CACHE_HINT event only: return the first item which the
list control advises us to cache.

ListEvent#get_cache_to

Integer get_cache_to()

For EVT_LIST_CACHE_HINT event only: return the last item (inclusive)
which the list control advises us to cache.

ListEvent#get_key_code

Integer get_key_code()

Key code if the event is a keypress event.

ListEvent#get_index

Integer get_index()

The item index.

ListEvent#get_column

Integer get_column()

The column position: it is only used with COL events. For the column
dragging events, it is the column to the left of the divider being dragged, for
the column click events it may be $-1$ if the user clicked in the list control
header outside any column.

ListEvent#get_point

Point get_point()

The position of the mouse pointer if the event is a drag event.

ListEvent#get_label

String get_label()

The (new) item label for EVT_LIST_END_LABEL_EDIT event.

ListEvent#get_text

String get_text()

The text.

ListEvent#get_image

Integer get_image()

The image.

ListEvent#get_data

Integer get_data()

The data.

ListEvent#get_mask

Integer get_mask()

The mask.

ListEvent#get_item

ListItem get_item()

An item object, used by some events. See also ListCtrl#set_item.

ListEvent#is_edit_cancelled

Boolean is_edit_cancelled()

This method only makes sense for EVT_LIST_END_LABEL_EDIT message
and returns if it the label editing has been cancelled by the user
(get_label returns an empty string in this case
but it doesn’t allow the application to distinguish between really cancelling the edit and
the admittedly rare case when the user wants to rename it to an empty string).

[This page automatically generated from the Textile source at 2023-06-13 21:31:41 +0000]