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 event is not generated when using the native GTK+ version of the control.
EVT_DATAVIEW_ITEM_BEGIN_DRAG: Process a wxEVT_DATAVIEW_ITEM_BEGIN_DRAG
event which is generated when the user starts dragging a valid item. This event must be processed and wx.dataview.DataViewEvent.SetDataObject
must be called to actually start dragging the item.
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.
Default constructor, normally shouldn’t be used and mostly exists only for backwards compatibility. |
|
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 column field is unavailable for this event. |
|
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 item affected by the event. |
|
Returns the wx.dataview.DataViewModel associated with the event. |
|
Returns the position of a context menu event in client coordinates. |
|
Returns the index of the child item at which an item currently being dragged would be dropped. |
|
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. |
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
Possible constructors:
DataViewEvent() -> None
DataViewEvent(evtType : EventType, dvc : DataViewCtrl, column :
DataViewColumn, item: DataViewItem=DataViewItem()) -> None
DataViewEvent(evtType : EventType, dvc : DataViewCtrl, item :
DataViewItem) -> None
DataViewEvent(event : DataViewEvent) -> None
This is the event class for the DataViewCtrl notifications.
__init__ (self)
Default constructor, normally shouldn’t be used and mostly exists only for backwards compatibility.
None
__init__ (self, evtType : EventType, dvc : DataViewCtrl, column : DataViewColumn, item: DataViewItem=DataViewItem())
Constructor for the events affecting columns (and possibly also items).
evtType (wx.EventType)
dvc (wx.dataview.DataViewCtrl)
column (wx.dataview.DataViewColumn)
item (wx.dataview.DataViewItem)
None
__init__ (self, evtType : EventType, dvc : DataViewCtrl, item : DataViewItem)
Constructor for the events affecting only the items.
evtType (wx.EventType)
dvc (wx.dataview.DataViewCtrl)
item (wx.dataview.DataViewItem)
None
__init__ (self, event : DataViewEvent)
Copy constructor.
event (wx.dataview.DataViewEvent)
None
Return the first row that will be displayed.
int
Return the last row that will be displayed.
int
Returns the position of the column in the control or -1 if column field is unavailable for this event.
For wxEVT_DATAVIEW_COLUMN_REORDERED, this is the new position of the column.
int
Gets the data buffer for a drop data transfer
Any
Gets the wx.DataFormat during a drop operation.
Gets the data size for a drop data transfer.
int
Returns a pointer to the wx.dataview.DataViewColumn from which the event was emitted or None
.
int
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 macOS native versions.
DragResult
Added in version 2.9.4.
Returns the item affected by the event.
Notice that for wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE
and wxEVT_DATAVIEW_ITEM_DROP
event handlers, the item may be invalid, indicating that the drop is about to happen outside of the item area.
Returns the wx.dataview.DataViewModel associated with the event.
Returns the position of a context menu event in client coordinates.
Point
Returns the index of the child item at which an item currently being dragged would be dropped.
This function can be used from wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE handlers to determine the exact position of the item being dropped.
Note that it currently always returns wx.NOT_FOUND
when using native GTK implementation of this control.
int
Added in version 4.1/wxWidgets-3.1.2.
Returns a reference to a value.
DVCVariant
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 macOS.
bool
Added in version 2.9.3.
from_ (int)
to_ (int)
None
Sets the column index associated with this event.
col (int)
None
buf
None
format (wx.DataFormat)
None
Set wx.DataObject for data transfer within a drag operation.
This method must be used inside a wxEVT_DATAVIEW_ITEM_BEGIN_DRAG
handler to associate the data object to be dragged with the item.
Note that the control takes ownership of the data object, i.e. obj must be heap-allocated and will be deleted by wx.dataview.DataViewCtrl itself.
obj (wx.DataObject)
None
size (int)
None
For wxEVT_DATAVIEW_COLUMN_HEADER_CLICK
only.
None
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 macOS versions.
flags (int)
None
Added in version 2.9.4.
See also
effect (DragResult)
None
item (wx.dataview.DataViewItem)
None
Sets the dataview model associated with this event.
model (wx.dataview.DataViewModel)
None
x (int)
y (int)
None
Sets the value associated with this event.
value (DVCVariant)
None
See GetCacheFrom
See GetCacheTo
See GetDataBuffer
and SetDataBuffer
See GetDataFormat
and SetDataFormat
See GetDataObject
and SetDataObject
See GetDataSize
and SetDataSize
See GetDataViewColumn
and SetDataViewColumn
See GetDragFlags
and SetDragFlags
See GetDropEffect
and SetDropEffect
See GetPosition
and SetPosition