This is the event class for the wx.dataview.DataViewCtrl notifications.
Handlers bound for the following event types will receive a wx.dataview.DataViewEvent parameter.
EVT_DATAVIEW_SELECTION_CHANGED: Process a wxEVT_DATAVIEW_SELECTION_CHANGED
event.
EVT_DATAVIEW_ITEM_ACTIVATED: Process a wxEVT_DATAVIEW_ITEM_ACTIVATED
event.
EVT_DATAVIEW_ITEM_EDITING_STARTED: Process a wxEVT_DATAVIEW_ITEM_EDITING_STARTED
event.
EVT_DATAVIEW_ITEM_EDITING_DONE: Process a wxEVT_DATAVIEW_ITEM_EDITING_DONE
event.
EVT_DATAVIEW_ITEM_COLLAPSING: Process a wxEVT_DATAVIEW_ITEM_COLLAPSING
event.
EVT_DATAVIEW_ITEM_COLLAPSED: Process a wxEVT_DATAVIEW_ITEM_COLLAPSED
event.
EVT_DATAVIEW_ITEM_EXPANDING: Process a wxEVT_DATAVIEW_ITEM_EXPANDING
event.
EVT_DATAVIEW_ITEM_EXPANDED: Process a wxEVT_DATAVIEW_ITEM_EXPANDED
event.
EVT_DATAVIEW_ITEM_VALUE_CHANGED: Process a wxEVT_DATAVIEW_ITEM_VALUE_CHANGED
event.
EVT_DATAVIEW_ITEM_CONTEXT_MENU: Process a wxEVT_DATAVIEW_ITEM_CONTEXT_MENU
event.
EVT_DATAVIEW_COLUMN_HEADER_CLICK: Process a wxEVT_DATAVIEW_COLUMN_HEADER_CLICK
event.
EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK: Process a wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK
event.
EVT_DATAVIEW_COLUMN_SORTED: Process a wxEVT_DATAVIEW_COLUMN_SORTED
event.
EVT_DATAVIEW_COLUMN_REORDERED: Process a wxEVT_DATAVIEW_COLUMN_REORDERED
event. Currently this even is only generated when using the native OSX version.
EVT_DATAVIEW_ITEM_BEGIN_DRAG: Process a wxEVT_DATAVIEW_ITEM_BEGIN_DRAG
event.
EVT_DATAVIEW_ITEM_DROP_POSSIBLE: Process a wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE
event.
EVT_DATAVIEW_ITEM_DROP: Process a wxEVT_DATAVIEW_ITEM_DROP
event.
EVT_DATAVIEW_CACHE_HINT: Process a wxEVT_DATAVIEW_CACHE_HINT
event.
Constructor. |
|
Return the first row that will be displayed. |
|
Return the last row that will be displayed. |
|
Returns the position of the column in the control or -1 if no column field was set by the event emitter. |
|
Gets the data buffer for a drop data transfer |
|
Gets the wx.DataFormat during a drop operation. |
|
Gets the data size for a drop data transfer. |
|
Returns a pointer to the wx.dataview.DataViewColumn from which the event was emitted or |
|
Returns the effect the user requested to happen to the dropped data. |
|
Returns the wx.dataview.DataViewModel associated with the event. |
|
Returns the position of a context menu event in screen coordinates. |
|
Returns a reference to a value. |
|
Can be used to determine whether the new value is going to be accepted in wxEVT_DATAVIEW_ITEM_EDITING_DONE handler. |
|
Sets the column index associated with this event. |
|
Set wx.DataObject for data transfer within a drag operation. |
|
For |
|
Specify the kind of the drag operation to perform. |
|
Sets the dataview model associated with this event. |
|
Sets the value associated with this event. |
wx.dataview.
DataViewEvent
(NotifyEvent)¶Possible constructors:
DataViewEvent(commandType=wxEVT_NULL, winid=0)
This is the event class for the DataViewCtrl notifications.
__init__
(self, commandType=wxEVT_NULL, winid=0)¶Constructor.
Typically used by wxWidgets internals only.
commandType (wx.EventType) –
winid (int) –
GetCacheFrom
(self)¶Return the first row that will be displayed.
int
GetCacheTo
(self)¶Return the last row that will be displayed.
int
GetColumn
(self)¶Returns the position of the column in the control or -1 if no column field was set by the event emitter.
int
GetDataBuffer
(self)¶Gets the data buffer for a drop data transfer
PyObject
GetDataFormat
(self)¶Gets the wx.DataFormat during a drop operation.
DataFormat
GetDataObject
(self)¶DataObject
GetDataSize
(self)¶Gets the data size for a drop data transfer.
int
GetDataViewColumn
(self)¶Returns a pointer to the wx.dataview.DataViewColumn from which the event was emitted or None
.
GetDragFlags
(self)¶int
GetDropEffect
(self)¶Returns the effect the user requested to happen to the dropped data.
This function can be used inside wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE and wxEVT_DATAVIEW_ITEM_DROP handlers and returns whether the user is trying to copy (the return value is wx.DragCopy
) or move (if the return value is wx.DragMove
) the data.
Currently this is only available when using the generic version of wx.dataview.DataViewCtrl (used e.g. under MSW) and always returns wx.DragNone
in the GTK and OS X native versions.
New in version 2.9.4.
GetItem
(self)¶GetModel
(self)¶Returns the wx.dataview.DataViewModel associated with the event.
GetPosition
(self)¶Returns the position of a context menu event in screen coordinates.
Point
GetValue
(self)¶Returns a reference to a value.
DVCVariant
IsEditCancelled
(self)¶Can be used to determine whether the new value is going to be accepted in wxEVT_DATAVIEW_ITEM_EDITING_DONE handler.
Returns True
if editing the item was cancelled or if the user tried to enter an invalid value (refused by wx.dataview.DataViewRenderer.Validate
). If this method returns False
, it means that the value in the model is about to be changed to the new one.
Notice that wxEVT_DATAVIEW_ITEM_EDITING_DONE event handler can call wx.NotifyEvent.Veto
to prevent this from happening.
Currently support for setting this field and for vetoing the change is only available in the generic version of wx.dataview.DataViewCtrl, i.e. under MSW but not GTK nor OS X.
bool
New in version 2.9.3.
SetCache
(self, from_, to_)¶from_ (int) –
to_ (int) –
SetColumn
(self, col)¶Sets the column index associated with this event.
col (int) –
SetDataBuffer
(self, buf)¶buf –
SetDataFormat
(self, format)¶format (wx.DataFormat) –
SetDataObject
(self, obj)¶Set wx.DataObject for data transfer within a drag operation.
obj (wx.DataObject) –
SetDataSize
(self, size)¶size (int) –
SetDataViewColumn
(self, col)¶For wxEVT_DATAVIEW_COLUMN_HEADER_CLICK
only.
col (wx.dataview.DataViewColumn) –
SetDragFlags
(self, flags)¶Specify the kind of the drag operation to perform.
This method can be used inside a wxEVT_DATAVIEW_ITEM_BEGIN_DRAG handler in order to configure the drag operation. Valid values are wx.Drag_CopyOnly
(default), wx.Drag_AllowMove
(allow the data to be moved) and wx.Drag_DefaultMove
.
Currently it is only honoured by the generic version of wx.dataview.DataViewCtrl (used e.g. under MSW) and not supported by the native GTK and OS X versions.
flags (int) –
New in version 2.9.4.
See also
SetDropEffect
(self, effect)¶effect (DragResult) –
SetEditCanceled
(self, editCancelled)¶editCancelled (bool) –
SetItem
(self, item)¶item (wx.dataview.DataViewItem) –
SetModel
(self, model)¶Sets the dataview model associated with this event.
model (wx.dataview.DataViewModel) –
SetPosition
(self, x, y)¶x (int) –
y (int) –
SetValue
(self, value)¶Sets the value associated with this event.
value (DVCVariant) –
EditCancelled
¶See IsEditCancelled
and SetEditCanceled