wx.grid.GridCellCoords¶
Represents coordinates of a grid cell.
An object of this class is simply a (row, column) pair.
Class Hierarchy¶
Methods Summary¶
Default constructor initializes the object to invalid state. |
|
Return the row and col properties as a tuple. |
|
Return the column of the coordinate. |
|
Returns an immutable representation of the |
|
Return the row of the coordinate. |
|
Set the row and column of the coordinate. |
|
Set the column of the coordinate. |
|
Set the row of the coordinate. |
|
Inequality operator. |
|
Equality operator. |
Properties Summary¶
Class API¶
- class wx.grid.GridCellCoords(object)¶
Possible constructors:
GridCellCoords() -> None GridCellCoords(row, col) -> None
Represents coordinates of a grid cell.
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self)
Default constructor initializes the object to invalid state.
Initially the row and column are both invalid (-1) and so
operator!
for an uninitialized wx.grid.GridCellCoords returnsFalse
.- Return type:
None
__init__ (self, row, col)
Constructor taking a row and a column.
- Parameters:
row (int)
col (int)
- Return type:
None
- Get(self)¶
Return the row and col properties as a tuple.
- Return type:
Any
- GetCol(self)¶
Return the column of the coordinate.
- Return type:
int
- GetIM(self)¶
Returns an immutable representation of the
wx.GridCellCoords
object, based onnamedtuple
.This new object is hashable and can be used as a dictionary key, be added to sets, etc. It can be converted back into a real
wx.GridCellCoords
with a simple statement like this:obj = wx.GridCellCoords(imObj)
.
- GetRow(self)¶
Return the row of the coordinate.
- Return type:
int
- Set(self, row, col)¶
Set the row and column of the coordinate.
- Parameters:
row (int)
col (int)
- Return type:
None
- SetCol(self, n)¶
Set the column of the coordinate.
- Parameters:
n (int)
- Return type:
None
- SetRow(self, n)¶
Set the row of the coordinate.
- Parameters:
n (int)
- Return type:
None
- __bool__(self)¶
- __getitem__(self, idx)¶
- __len__(self)¶
- __nonzero__(self)¶
- __reduce__(self)¶
- __repr__(self)¶
- __setitem__(self, idx, val)¶
- __str__(self)¶
- __ne__(self, other)¶
Inequality operator.
- Parameters:
other (wx.grid.GridCellCoords)
- Return type:
bool
- __eq__(self, other)¶
Equality operator.
- Parameters:
other (wx.grid.GridCellCoords)
- Return type:
bool
Properties¶