************ wx.ListEvent ************ Inheritance diagram for `wx.ListEvent`: | .. inheritance-diagram:: wx.ListEvent | Description =========== A list event holds information about events associated with `wx.ListCtrl <../Widgets/wx.ListCtrl.html>`_ objects. .. seealso:: `wx.ListCtrl <../Widgets/wx.ListCtrl.html>`_ Derived From ^^^^^^^^^^^^^ * `wx.NotifyEvent `_ * `wx.CommandEvent `_ * `wx.Event `_ * `wx.Object <../Widgets/wx.Object.html>`_ Event Handling ^^^^^^^^^^^^^^ ================================================== ================================================== Event Name Description ================================================== ================================================== wx.EVT_LIST_BEGIN_DRAG(id, func) Begin dragging with the left mouse button. wx.EVT_LIST_BEGIN_RDRAG(id, func) Begin dragging with the right mouse button. wx.EVT_LIST_BEGIN_LABEL_EDIT(id, func) Begin editing a label. This can be prevented by calling `Veto()`. wx.EVT_LIST_END_LABEL_EDIT(id, func) Finish editing a label. This can be prevented by calling `Veto()`. wx.EVT_LIST_DELETE_ITEM(id, func) Delete an item. wx.EVT_LIST_DELETE_ALL_ITEMS(id, func) Delete all items. wx.EVT_LIST_ITEM_SELECTED(id, func) The item has been selected. wx.EVT_LIST_ITEM_DESELECTED(id, func) The item has been deselected. wx.EVT_LIST_ITEM_ACTIVATED(id, func) The item has been activated (``ENTER`` or double click). wx.EVT_LIST_ITEM_FOCUSED(id, func) The currently focused item has changed. wx.EVT_LIST_ITEM_MIDDLE_CLICK(id, func) The middle mouse button has been clicked on an item. wx.EVT_LIST_ITEM_RIGHT_CLICK(id, func) The right mouse button has been clicked on an item. wx.EVT_LIST_KEY_DOWN(id, func) A key has been pressed. wx.EVT_LIST_INSERT_ITEM(id, func) An item has been inserted. wx.EVT_LIST_COL_CLICK(id, func) A column has been left-clicked. wx.EVT_LIST_COL_RIGHT_CLICK(id, func) A column (which can be -1 if the click occurred outside any column) has been right-clicked. wx.EVT_LIST_COL_BEGIN_DRAG(id, func) The user started resizing a column - can be vetoed. wx.EVT_LIST_COL_DRAGGING(id, func) The divider between columns is being dragged. wx.EVT_LIST_COL_END_DRAG(id, func) A column has been resized by the user. wx.EVT_LIST_CACHE_HINT(id, func) Prepare cache for a virtual list control. ================================================== ================================================== Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetCacheFrom <#GetCacheFrom>`_ * `GetCacheTo <#GetCacheTo>`_ * `GetColumn <#GetColumn>`_ * `GetData <#GetData>`_ * `GetImage <#GetImage>`_ * `GetIndex <#GetIndex>`_ * `GetItem <#GetItem>`_ * `GetKeyCode <#GetKeyCode>`_ * `GetLabel <#GetLabel>`_ * `GetMask <#GetMask>`_ * `GetPoint <#GetPoint>`_ * `GetText <#GetText>`_ * `IsEditCancelled <#IsEditCancelled>`_ * `SetEditCanceled <#SetEditCanceled>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `CacheFrom <#CacheFrom>`_ * `CacheTo <#CacheTo>`_ * `Column <#Column>`_ * `Data <#Data>`_ * `Image <#Image>`_ * `Index <#Index>`_ * `Item <#Item>`_ * `KeyCode <#KeyCode>`_ * `Label <#Label>`_ * `Mask <#Mask>`_ * `Point <#Point>`_ * `Text <#Text>`_ * `m_code <#m_code>`_ * `m_col <#m_col>`_ * `m_item <#m_item>`_ * `m_itemIndex <#m_itemIndex>`_ * `m_oldItemIndex <#m_oldItemIndex>`_ * `m_pointDrag <#m_pointDrag>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(commandType=wx.wxEVT_NULL, id=0) Constructor. **Parameters:** * `commandType` (eventtype) * `id` (int) | **Returns:** `wx.ListEvent `_ -------- .. method:: GetCacheFrom() For ``wx.EVT_LIST_CACHE_HINT`` event only: return the first item which the list control advises us to cache. | **Returns:** `long` -------- .. method:: GetCacheTo() For ``wx.EVT_LIST_CACHE_HINT`` event only: return the last item (inclusive) which the list control advises us to cache. | **Returns:** `long` -------- .. method:: GetColumn() 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. | **Returns:** `int` -------- .. method:: GetData() The data. | **Returns:** `long` -------- .. method:: GetImage() The image. | **Returns:** `int` -------- .. method:: GetIndex() The item index. | **Returns:** `long` -------- .. method:: GetItem() An item object, used by some events. See also `wx.ListCtrl.SetItem <../Widgets/wx.ListCtrl.html#SetItem>`_. | **Returns:** `wx.ListItem <../Widgets/wx.ListItem.html>`_ -------- .. method:: GetKeyCode() Key code if the event is a keypress event. | **Returns:** `int` -------- .. method:: GetLabel() The (new) item label for ``wx.EVT_LIST_END_LABEL_EDIT`` event. | **Returns:** `string` -------- .. method:: GetMask() The mask. | **Returns:** `long` -------- .. method:: GetPoint() The position of the mouse pointer if the event is a drag event. | **Returns:** `wx.Point <../Widgets/wx.Point.html>`_ -------- .. method:: GetText() The text. | **Returns:** `string` -------- .. method:: IsEditCancelled() This method only makes sense for ``wx.EVT_LIST_END_LABEL_EDIT`` message and returns ``True`` if it the label editing has been cancelled by the user (`GetLabel <#GetLabel>`_ 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). | **Returns:** `bool` -------- .. method:: SetEditCanceled(editCancelled) | **Parameters:** * `editCancelled` (bool) -------- Properties ^^^^^^^^^^ .. attribute:: CacheFrom See `GetCacheFrom <#GetCacheFrom>`_ .. attribute:: CacheTo See `GetCacheTo <#GetCacheTo>`_ .. attribute:: Column See `GetColumn <#GetColumn>`_ .. attribute:: Data See `GetData <#GetData>`_ .. attribute:: Image See `GetImage <#GetImage>`_ .. attribute:: Index See `GetIndex <#GetIndex>`_ .. attribute:: Item See `GetItem <#GetItem>`_ .. attribute:: KeyCode See `GetKeyCode <#GetKeyCode>`_ .. attribute:: Label See `GetLabel <#GetLabel>`_ .. attribute:: Mask See `GetMask <#GetMask>`_ .. attribute:: Point See `GetPoint <#GetPoint>`_ .. attribute:: Text See `GetText <#GetText>`_ .. attribute:: m_code See `GetKeyCode <#GetKeyCode>`_ .. attribute:: m_col See `GetColumn <#GetColumn>`_ .. attribute:: m_item See `GetItem <#GetItem>`_ .. attribute:: m_itemIndex See `GetIndex <#GetIndex>`_ .. attribute:: m_oldItemIndex .. attribute:: m_pointDrag See `GetPoint <#GetPoint>`_