Class CellCancelArgs
- class ooodev.events.args.calc.cell_cancel_args.CellCancelArgs(source, cancel=False)[source]
Bases:
AbstractCellCancelArgs
Sheet Cancel Event Args
- Parameters:
source (Any) –
- __init__(source, cancel=False)
Constructor
- Parameters:
source (Any) – Event Source
cancel (bool, optional) – Cancel value. Defaults to False.
- Return type:
None
- static from_args(args)[source]
Gets a new instance from existing instance
- Parameters:
args (AbstractCellCancelArgs) – Existing Instance
- Returns:
args
- Return type:
- get(key, default=<object object>)
Gets user data from event.
- Parameters:
key (str) – Key used to store data
default (Any, optional) – Default value to return if
key
is not found.
- Returns:
Data for
key
if found; Otherwise, ifdefault
is set thendefault
.- Return type:
Any
New in version 0.9.0.
- has(key)
Gets if a key exist in the instance
- Parameters:
key (str) – key
- Returns:
True
if key exist; OtherwiseFalse
- Return type:
bool
New in version 0.9.0.
- remove(key)
Removes key value pair from instance
- Parameters:
key (str) – key
- Returns:
True
if key was found and removed; Otherwise,False
- Return type:
bool
New in version 0.9.0.
- set(key, value, allow_overwrite=True)
Sets a key value pair for event instance.
- Parameters:
key (str) – Key
value (Any) – Value
allow_overwrite (bool, optional) – If
True
and akey
already exist then itsvalue
will be over written; Otherwisevalue
will not be over written. Defaults toTrue
.
- Returns:
True
if values is written; Otherwise,False
- Return type:
bool
New in version 0.9.0.
- cancel: bool
Gets/Sets cancel value
- cells: Any
Gets/Sets the cells for the event.
Depending on the event can be any cell value such as a cell name, range, XCell, XCellRange etc.
- event_data: Any
Gets/Sets any extra data associated with the event
- property event_name: str
Gets the event name for these args
- Return type:
str
- property event_source: Any | None
Gets the event source for these args
- Return type:
Any | None
- handled: bool
Get/Set Handled value. Typically if set to
True
thencancel
is ignored.
- sheet: XSpreadsheet | None
Gets/Sets spreadsheet of the event
- source: Any
Gets/Sets Event source