A list event holds information about events associated with wx.ListCtrl objects.
Handlers bound for the following event types will receive a wx.ListEvent parameter.
Veto
Veto
ENTER
or double click).GetIndex
may be -1 if no item is selected.See also
__init__ |
Constructor. |
GetCacheFrom |
For EVT_LIST_CACHE_HINT event only: return the first item which the list control advises us to cache. |
GetCacheTo |
For EVT_LIST_CACHE_HINT event only: return the last item (inclusive) which the list control advises us to cache. |
GetColumn |
The column position: it is only used with COL events. |
GetData |
The data. |
GetImage |
The image. |
GetIndex |
The item index. |
GetItem |
An item object, used by some events. |
GetKeyCode |
Key code if the event is a keypress event. |
GetLabel |
The (new) item label for EVT_LIST_END_LABEL_EDIT event. |
GetMask |
The mask. |
GetPoint |
The position of the mouse pointer if the event is a drag event. |
GetText |
The text. |
IsEditCancelled |
This method only makes sense for EVT_LIST_END_LABEL_EDIT message and returns True if it the label editing has been cancelled by the user ( 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). |
SetCacheFrom |
|
SetCacheTo |
|
SetColumn |
|
SetIndex |
|
SetItem |
|
SetKeyCode |
|
SetPoint |
CacheFrom |
See GetCacheFrom and SetCacheFrom |
CacheTo |
See GetCacheTo and SetCacheTo |
Column |
See GetColumn and SetColumn |
Data |
See GetData |
Image |
See GetImage |
Index |
See GetIndex and SetIndex |
Item |
See GetItem and SetItem |
KeyCode |
See GetKeyCode and SetKeyCode |
Label |
See GetLabel |
Mask |
See GetMask |
Point |
See GetPoint and SetPoint |
Text |
See GetText |
wx.
ListEvent
(NotifyEvent)¶Possible constructors:
ListEvent(commandType=wxEVT_NULL, id=0)
A list event holds information about events associated with ListCtrl objects.
__init__
(self, commandType=wxEVT_NULL, id=0)¶Constructor.
Parameters: |
|
---|
GetCacheFrom
(self)¶For EVT_LIST_CACHE_HINT
event only: return the first item which the list control advises us to cache.
Return type: | long |
---|
GetCacheTo
(self)¶For EVT_LIST_CACHE_HINT
event only: return the last item (inclusive) which the list control advises us to cache.
Return type: | long |
---|
GetColumn
(self)¶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.
Return type: | int |
---|
GetData
(self)¶The data.
Return type: | wx.UIntPtr |
---|
GetImage
(self)¶The image.
Return type: | int |
---|
GetIndex
(self)¶The item index.
Return type: | long |
---|
GetItem
(self)¶An item object, used by some events.
See also wx.ListCtrl.SetItem
.
Return type: | wx.ListItem |
---|
GetKeyCode
(self)¶Key code if the event is a keypress event.
Return type: | int |
---|
GetLabel
(self)¶The (new) item label for EVT_LIST_END_LABEL_EDIT
event.
Return type: | string |
---|
GetMask
(self)¶The mask.
Return type: | long |
---|
GetPoint
(self)¶The position of the mouse pointer if the event is a drag event.
Return type: | wx.Point |
---|
GetText
(self)¶The text.
Return type: | string |
---|
IsEditCancelled
(self)¶This method only makes sense for EVT_LIST_END_LABEL_EDIT
message and returns True
if it the label editing has been cancelled by the user ( 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).
Return type: | bool |
---|
SetCacheFrom
(self, cacheFrom)¶Parameters: | cacheFrom (long) – |
---|
See also
SetCacheTo
(self, cacheTo)¶Parameters: | cacheTo (long) – |
---|
See also
SetItem
(self, item)¶Parameters: | item (wx.ListItem) – |
---|
See also
SetKeyCode
(self, code)¶Parameters: | code (int) – |
---|
See also
CacheFrom
¶See GetCacheFrom
and SetCacheFrom
CacheTo
¶See GetCacheTo
and SetCacheTo
KeyCode
¶See GetKeyCode
and SetKeyCode