.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.agw.ultimatelistctrl

.. highlight:: python



.. _wx.lib.agw.ultimatelistctrl.CommandListEvent:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.ultimatelistctrl.CommandListEvent**
==========================================================================================================================================

A list event holds information about events associated with :class:`UltimateListCtrl`
objects.



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>CommandListEvent</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.agw.ultimatelistctrl.CommandListEvent_inheritance.png" alt="Inheritance diagram of CommandListEvent" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.agw.ultimatelistctrl.CommandListEvent.html" title="A list event holds information about events associated with UltimateListCtrl" alt="" coords="5,315,333,344"/> <area shape="rect" id="node2" href="wx.PyCommandEvent.html" title="PyCommandEvent can be used as a base class for implementing" alt="" coords="85,237,253,267"/> <area shape="rect" id="node3" href="wx.CommandEvent.html" title="This event class contains information about command events, which originate from a variety of simple controls." alt="" coords="93,160,245,189"/> <area shape="rect" id="node4" href="wx.Event.html" title="An event is a structure holding information about an event passed to a callback or member function." alt="" coords="128,83,211,112"/> <area shape="rect" id="node5" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="125,5,213,35"/> </map> 
   </p>
   </div>

|


|sub_classes| Known Subclasses
==============================

:class:`wx.lib.agw.ultimatelistctrl.UltimateListEvent`

|


|super_classes| Known Superclasses
==================================

:class:`wx.PyCommandEvent`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.__init__`                   Default class constructor.
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.GetCacheFrom`               Returns the first item which the list control advises us to cache.
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.GetCacheTo`                 Returns the last item (inclusive) which the list control advises us to cache.
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.GetColumn`                  Returns the column position: it is only used with ``COL`` events.
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.GetData`                    Returns the item data.
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.GetImage`                   Returns the item image.
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.GetIndex`                   Returns the item index.
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.GetItem`                    Returns the item itself.
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.GetKeyCode`                 Returns the key code if the event is a keypress event.
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.GetLabel`                   Returns the (new) item label for ``EVT_LIST_END_LABEL_EDIT`` event.
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.GetMask`                    Returns the item mask.
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.GetPoint`                   Returns the position of the mouse pointer if the event is a drag event.
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.GetText`                    Returns the item text.
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.IsEditCancelled`            Returns ``True`` if it the label editing has been cancelled by the user
:meth:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.SetEditCanceled`            Sets the item editing as cancelled/not cancelled.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.lib.agw.ultimatelistctrl.CommandListEvent.Index`                      See `GetIndex`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: CommandListEvent(wx.PyCommandEvent)

   A list event holds information about events associated with :class:`UltimateListCtrl`
   objects.

   .. method:: __init__(self, commandTypeOrEvent=None, winid=0)

      Default class constructor.
      For internal use: do not call it in your code!
      
      :param `commandTypeOrEvent`: the event type or another instance of
       :class:`PyCommandEvent`;
      :param `winid`: the event identifier.


   .. method:: GetCacheFrom(self)

      Returns the first item which the list control advises us to cache.
      
      .. note:: This method is meaningful for ``EVT_LIST_CACHE_HINT`` event only.


   .. method:: GetCacheTo(self)

      Returns the last item (inclusive) which the list control advises us to cache.
      
      .. note:: This method is meaningful for ``EVT_LIST_CACHE_HINT`` event only.


   .. method:: GetColumn(self)

      Returns 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.


   .. method:: GetData(self)

      Returns the item data. 


   .. method:: GetImage(self)

      Returns the item image. 


   .. method:: GetIndex(self)

      Returns the item index. 


   .. method:: GetItem(self)

      Returns the item itself. 


   .. method:: GetKeyCode(self)

      Returns the key code if the event is a keypress event. 


   .. method:: GetLabel(self)

      Returns the (new) item label for ``EVT_LIST_END_LABEL_EDIT`` event. 


   .. method:: GetMask(self)

      Returns the item mask. 


   .. method:: GetPoint(self)

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


   .. method:: GetText(self)

      Returns the item text. 


   .. method:: IsEditCancelled(self)

      Returns ``True`` if it the label editing has been cancelled by the user
      ( :meth:`~CommandListEvent.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).
      
      .. note:: This method only makes sense for ``EVT_LIST_END_LABEL_EDIT`` messages.


   .. method:: SetEditCanceled(self, editCancelled)

      Sets the item editing as cancelled/not cancelled.
      
      :param `editCancelled`: ``True`` to set the item editing as cancelled, ``False``
       otherwise.
      
      .. note:: This method only makes sense for ``EVT_LIST_END_LABEL_EDIT`` messages.


   .. attribute:: Index

      See `GetIndex`