Simplest type of data table for a grid for small tables of strings that are stored in memory.
The number of rows and columns in the table can be specified initially but may also be changed later dynamically.
Default constructor creates an empty table. |
|
Exactly the same as |
|
Append additional rows at the end of the table. |
|
Clear the table contents. |
|
Exactly the same as |
|
Delete rows from the table. |
|
Return the label of the specified column. |
|
Return the label of the grid’s corner. |
|
Must be overridden to return the number of columns in the table. |
|
Must be overridden to return the number of rows in the table. |
|
Return the label of the specified row. |
|
Must be overridden to implement accessing the table values as text. |
|
Exactly the same as |
|
Insert additional rows into the table. |
|
Exactly the same as |
|
Set the given label for the grid’s corner. |
|
Set the given label for the specified row. |
|
Must be overridden to implement setting the table values as text. |
See |
|
See |
wx.grid.
GridStringTable
(GridTableBase)¶Possible constructors:
GridStringTable() -> None
GridStringTable(numRows : int, numCols : int) -> None
Simplest type of data table for a grid for small tables of strings that are stored in memory.
__init__
(self, *args, **kw)¶__init__ (self)
Default constructor creates an empty table.
None
__init__ (self, numRows : int, numCols : int)
Constructor taking number of rows and columns.
numRows (int) –
numCols (int) –
None
AppendCols
(self, numCols: int=1)¶Exactly the same as AppendRows
but for columns.
numCols (int) –
bool
AppendRows
(self, numRows: int=1)¶Append additional rows at the end of the table.
This method is provided in addition to InsertRows
as some data models may only support appending rows to them but not inserting them at arbitrary locations. In such case you may implement this method only and leave InsertRows
unimplemented.
numRows (int) – The number of rows to add.
bool
Clear
(self)¶Clear the table contents.
This method is used by wx.grid.Grid.ClearGrid
.
None
DeleteCols
(self, pos: int=0, numCols: int=1)¶Exactly the same as DeleteRows
but for columns.
pos (int) –
numCols (int) –
bool
DeleteRows
(self, pos: int=0, numRows: int=1)¶Delete rows from the table.
pos (int) – The first row to delete.
numRows (int) – The number of rows to delete.
bool
GetColLabelValue
(self, col : int)¶Return the label of the specified column.
col (int) –
str
GetCornerLabelValue
(self)¶Return the label of the grid’s corner.
str
New in version 4.1/wxWidgets-3.1.2.
GetNumberCols
(self)¶Must be overridden to return the number of columns in the table.
For backwards compatibility reasons, this method is not const. Use GetColsCount
instead of it in methods of derived table classes,
int
GetNumberRows
(self)¶Must be overridden to return the number of rows in the table.
For backwards compatibility reasons, this method is not const. Use GetRowsCount
instead of it in methods of derived table classes.
int
GetRowLabelValue
(self, row : int)¶Return the label of the specified row.
row (int) –
str
GetValue
(self, row : int, col : int)¶Must be overridden to implement accessing the table values as text.
row (int) –
col (int) –
str
InsertCols
(self, pos: int=0, numCols: int=1)¶Exactly the same as InsertRows
but for columns.
pos (int) –
numCols (int) –
bool
InsertRows
(self, pos: int=0, numRows: int=1)¶Insert additional rows into the table.
pos (int) – The position of the first new row.
numRows (int) – The number of rows to insert.
bool
SetColLabelValue
(self, col : int, label : str)¶Exactly the same as SetRowLabelValue
but for columns.
col (int) –
label (string) –
None
SetCornerLabelValue
(self, : str)¶Set the given label for the grid’s corner.
The default version does nothing, i.e. the label is not stored. You must override this method in your derived class if you wish wx.grid.Grid.GetCornerLabelValue
to work.
`` (string) –
None
New in version 4.1/wxWidgets-3.1.2.
SetRowLabelValue
(self, row : int, label : str)¶Set the given label for the specified row.
The default version does nothing, i.e. the label is not stored. You must override this method in your derived class if you wish wx.grid.Grid.SetRowLabelValue
to work.
row (int) –
label (string) –
None
SetValue
(self, row : int, col : int, value : str)¶Must be overridden to implement setting the table values as text.
row (int) –
col (int) –
value (string) –
None
CornerLabelValue
¶NumberCols
¶See GetNumberCols
NumberRows
¶See GetNumberRows