This is the event class for the DataViewCtrl notifications.
Handlers bound for the following event types will receive a DataViewEvent parameter.
__init__ | Constructor. |
GetCacheFrom | Return the first row that will be displayed. |
GetCacheTo | Return the last row that will be displayed. |
GetColumn | Returns the position of the column in the control or -1 if no column field was set by the event emitter. |
GetDataBuffer | Gets the data buffer for a drop data transfer. |
GetDataFormat | Gets the DataFormat during a drop operation. |
GetDataSize | Gets the data size for a drop data transfer. |
GetDataViewColumn | Returns a pointer to the DataViewColumn from which the event was emitted or None. |
GetDropEffect | Returns the effect the user requested to happen to the dropped data. |
GetModel | Returns the DataViewModel associated with the event. |
GetPosition | Returns the position of a context menu event in screen coordinates. |
GetValue | Returns a reference to a value. |
IsEditCancelled | Can be used to determine whether the new value is going to be accepted in wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE handler. |
SetColumn | Sets the column index associated with this event. |
SetDataObject | Set DataObject for data transfer within a drag operation. |
SetDataViewColumn | For wxEVT_DATAVIEW_COLUMN_HEADER_CLICK only. |
SetDragFlags | Specify the kind of the drag operation to perform. |
SetModel | Sets the dataview model associated with this event. |
SetValue | Sets the value associated with this event. |
CacheFrom | See GetCacheFrom |
CacheTo | See GetCacheTo |
Column | See GetColumn and SetColumn |
DataBuffer | See GetDataBuffer |
DataFormat | See GetDataFormat |
DataSize | See GetDataSize |
DataViewColumn | See GetDataViewColumn and SetDataViewColumn |
DropEffect | See GetDropEffect |
Model | See GetModel and SetModel |
Position | See GetPosition |
Value | See GetValue and SetValue |
This is the event class for the DataViewCtrl notifications.
Possible constructors:
DataViewEvent(commandType=wxEVT_NULL, winid=0)
Constructor.
Typically used by wxWidgets internals only.
Parameters: |
|
---|
Return the first row that will be displayed.
Return type: | int |
---|
Return the last row that will be displayed.
Return type: | int |
---|
Returns the position of the column in the control or -1 if no column field was set by the event emitter.
Return type: | int |
---|
Gets the data buffer for a drop data transfer.
Gets the DataFormat during a drop operation.
Return type: | DataFormat |
---|
Gets the data size for a drop data transfer.
Return type: | int |
---|
Returns a pointer to the DataViewColumn from which the event was emitted or None.
Return type: | DataViewColumn |
---|
Returns the effect the user requested to happen to the dropped data.
This function can be used inside wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE and wxEVT_COMMAND_DATAVIEW_ITEM_DROP handlers and returns whether the user is trying to copy (the return value is DragCopy ) or move (if the return value is DragMove ) the data.
Currently this is only available when using the generic version of DataViewCtrl (used e.g. under MSW) and always returns DragNone in the GTK and OS X native versions.
Return type: | DragResult |
---|
New in version 2.9.4.
Returns the DataViewModel associated with the event.
Return type: | DataViewModel |
---|
Returns the position of a context menu event in screen coordinates.
Return type: | Point |
---|
Returns a reference to a value.
Return type: | Variant |
---|
Can be used to determine whether the new value is going to be accepted in wxEVT_COMMAND_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 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_COMMAND_DATAVIEW_ITEM_EDITING_DONE event handler can call 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 DataViewCtrl, i.e. under MSW but not GTK nor OS X.
Return type: | bool |
---|
New in version 2.9.3.
Sets the column index associated with this event.
Parameters: | col (int) – |
---|
Set DataObject for data transfer within a drag operation.
Parameters: | obj (DataObject) – |
---|
For wxEVT_DATAVIEW_COLUMN_HEADER_CLICK only.
Parameters: | col (dataview.DataViewColumn) – |
---|
Specify the kind of the drag operation to perform.
This method can be used inside a wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG handler in order to configure the drag operation. Valid values are Drag_CopyOnly (default), Drag_AllowMove (allow the data to be moved) and Drag_DefaultMove .
Currently it is only honoured by the generic version of DataViewCtrl (used e.g. under MSW) and not supported by the native GTK and OS X versions.
Parameters: | flags (int) – |
---|
New in version 2.9.4.
See also
Sets the dataview model associated with this event.
Parameters: | model (dataview.DataViewModel) – |
---|
Sets the value associated with this event.
Parameters: | value (Variant) – |
---|
See GetCacheFrom
See GetCacheTo
See GetDataBuffer
See GetDataFormat
See GetDataSize
See GetDataViewColumn and SetDataViewColumn
See GetDropEffect
See GetPosition