wx.grid.GridTableMessage¶
Message class used by the grid table to send requests and notifications to the grid view.
A message object of this class must be sent to the grid using wx.grid.Grid.ProcessTableMessage every time the table changes, e.g. rows are added/deleted. The messages are just notifications and don’t result in any changes to the table data, but allow the view to react to changes to the model.
The table must be updated before sending the notification. For example, a custom wx.grid.GridTableBase.InsertRows implementation should first insert the rows into its own data storage and only then notify the grid:
The same rule applies to the other row and column modification messages: update the table first, then notify the grid.
Class Hierarchy¶
Methods Summary¶
Default constructor initializes the object to invalid state. |
|
Get the position at which the insertion/deletion occurs. |
|
Get the number of rows to be inserted/deleted. |
|
Gets an id. |
|
Gets the table object. |
|
Set the position at which the insertion/deletion occurs. |
|
Set the number of rows to be inserted/deleted. |
|
Sets an id. |
|
Sets the table object. |
Properties Summary¶
See |
|
See |
|
See |
Class API¶
- class wx.grid.GridTableMessage(object)¶
Possible constructors:
GridTableMessage() -> None GridTableMessage(table, id, comInt1=-1, comInt2=-1) -> None
Message class used by the grid table to send requests and notifications to the grid view.
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self)
Default constructor initializes the object to invalid state.
- Return type:
None
__init__ (self, table, id, comInt1=-1, comInt2=-1)
Constructor initializes the message.
- Parameters:
table (wx.grid.GridTableBase) – Pointer to the grid table
id (int) – One of GridTableRequest enum elements.
comInt1 (int) – For the insert/delete messages, position at which the rows or columns are inserted/deleted. For the append messages, the number of rows or columns that were appended.
comInt2 (int) – For the insert/delete messages, number of rows or columns to be inserted/deleted. For the append messages, this parameter is not used.
- Return type:
None
- GetCommandInt(self)¶
Get the position at which the insertion/deletion occurs.
- Return type:
int
- GetCommandInt2(self)¶
Get the number of rows to be inserted/deleted.
- Return type:
int
- GetId(self)¶
Gets an id.
- Return type:
int
- GetTableObject(self)¶
Gets the table object.
- Return type:
- SetCommandInt(self, comInt1)¶
Set the position at which the insertion/deletion occurs.
- Parameters:
comInt1 (int)
- Return type:
None
- SetCommandInt2(self, comInt2)¶
Set the number of rows to be inserted/deleted.
- Parameters:
comInt2 (int)
- Return type:
None
- SetId(self, id)¶
Sets an id.
- Parameters:
id (int)
- Return type:
None
- SetTableObject(self, table)¶
Sets the table object.
- Parameters:
table (wx.grid.GridTableBase)
- Return type:
None
Properties¶
- CommandInt¶
See
GetCommandIntandSetCommandInt
- CommandInt2¶
See
GetCommandInt2andSetCommandInt2
- TableObject¶
See
GetTableObjectandSetTableObject
