wx.grid.GridBlockCoords¶Represents coordinates of a block of cells in the grid.
An object of this class contains coordinates of the left top and the bottom right corners of a block.
New in version 4.1/wxWidgets-3.1.4.
Class Hierarchy¶
Inheritance diagram for class GridBlockCoords:

Methods Summary¶Default constructor initializes the object to invalid state. |
|
Return the canonicalized block where top left coordinates is less then bottom right coordinates. |
|
Check whether this block contains the given cell. |
|
Calculates the result blocks by subtracting the other block from this block. |
|
Return the block coordinants as a tuple. |
|
Return the coordinates of the bottom right corner. |
|
Return the row of the bottom right corner. |
|
Return the column of the left top corner. |
|
Return the column of the bottom right corner. |
|
Return the coordinates of the top left corner. |
|
Return the row of the left top corner. |
|
Whether the blocks intersect. |
|
Set the row of the bottom right corner. |
|
Set the column of the left top corner. |
|
Set the column of the bottom right corner. |
|
Set the row of the left top corner. |
|
Calculates the symmetric difference of the blocks. |
|
Inequality operator. |
|
Equality operator. |
Properties Summary¶See |
|
See |
|
See |
|
See |
|
See |
|
Class API¶wx.grid.GridBlockCoords(object)¶Possible constructors:
GridBlockCoords()
GridBlockCoords(topRow, leftCol, bottomRow, rightCol)
Represents coordinates of a block of cells in the grid.
__init__(self, *args, **kw)¶__init__ (self)
Default constructor initializes the object to invalid state.
Initially the coordinates are invalid (-1) and so operator! for an uninitialized wx.grid.GridBlockCoords returns True.
__init__ (self, topRow, leftCol, bottomRow, rightCol)
Constructor taking a coordinates of the left top and the bottom right corners.
topRow (int) –
leftCol (int) –
bottomRow (int) –
rightCol (int) –
Canonicalize(self)¶Return the canonicalized block where top left coordinates is less then bottom right coordinates.
Contains(self, *args, **kw)¶Contains (self, cell)
Check whether this block contains the given cell.
cell (wx.grid.GridCellCoords) –
bool
True, if the block contains the cell, False otherwise.
Contains (self, other)
Check whether this block contains another one.
other (wx.grid.GridBlockCoords) –
bool
True if other is entirely contained within this block.
Difference(self, other, splitOrientation)¶Calculates the result blocks by subtracting the other block from this block.
other (wx.grid.GridBlockCoords) – The block to subtract from this block.
splitOrientation (int) – The block splitting orientation (either HORIZONTAL or VERTICAL ).
Up to 4 blocks. If block doesn’t exist in the result, it has value of GridNoBlockCoords .
Get(self)¶Return the block coordinants as a tuple.
tuple
( topRow, leftCol, bottomRow, rightCol )
GetBottomRight(self)¶Return the coordinates of the bottom right corner.
GetBottomRow(self)¶Return the row of the bottom right corner.
int
GetLeftCol(self)¶Return the column of the left top corner.
int
GetRightCol(self)¶Return the column of the bottom right corner.
int
GetTopLeft(self)¶Return the coordinates of the top left corner.
GetTopRow(self)¶Return the row of the left top corner.
int
Intersects(self, other)¶Whether the blocks intersect.
other (wx.grid.GridBlockCoords) –
bool
True, if the block intersects with the other, False, otherwise.
SetBottomRow(self, row)¶Set the row of the bottom right corner.
row (int) –
SetLeftCol(self, col)¶Set the column of the left top corner.
col (int) –
SetRightCol(self, col)¶Set the column of the bottom right corner.
col (int) –
SetTopRow(self, row)¶Set the row of the left top corner.
row (int) –
SymDifference(self, other)¶Calculates the symmetric difference of the blocks.
other (wx.grid.GridBlockCoords) – The block to subtract from this block.
Up to 4 blocks. If block doesn’t exist in the result, it has value of GridNoBlockCoords .
__bool__(self)¶int
__repr__(self)¶__str__(self)¶__ne__(self)¶Inequality operator.
other (wx.grid.GridBlockCoords) –
__eq__(self)¶Equality operator.
other (wx.grid.GridBlockCoords) –
BottomRight¶See GetBottomRight
BottomRow¶See GetBottomRow and SetBottomRow
LeftCol¶See GetLeftCol and SetLeftCol
RightCol¶See GetRightCol and SetRightCol
TopLeft¶See GetTopLeft