Phoenix Logo

phoenix_title wx.grid.GridCellCoords

Represents coordinates of a grid cell.

An object of this class is simply a (row, column) pair.


class_hierarchy Class Hierarchy

Inheritance diagram for class GridCellCoords:


method_summary Methods Summary

__init__ Default constructor initializes the object to invalid state.
Get Return the row and col properties as a tuple.
GetCol Return the column of the coordinate.
GetIM Returns an immutable representation of the wx.GridCellCoords object, based on namedtuple.
GetRow Return the row of the coordinate.
Set Set the row and column of the coordinate.
SetCol Set the column of the coordinate.
SetRow Set the row of the coordinate.
__getitem__  
__len__  
__nonzero__  
__reduce__  
__repr__  
__setitem__  
__str__  
__ne__ Inequality operator.
__eq__ Equality operator.

property_summary Properties Summary

Col See GetCol and SetCol
Row See GetRow and SetRow

api Class API



class wx.grid.GridCellCoords(object)

Possible constructors:

GridCellCoords()

GridCellCoords(row, col)

Represents coordinates of a grid cell.


Methods



__init__(self, *args, **kw)

overload Overloaded Implementations:



__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 returns False.



__init__ (self, row, col)

Constructor taking a row and a column.

Parameters:
  • row (int) –
  • col (int) –





Get(self)

Return the row and col properties as a tuple.

Return type:tuple
Returns:( row, col )


GetCol(self)

Return the column of the coordinate.

Return type:int


GetIM(self)

Returns an immutable representation of the wx.GridCellCoords object, based on namedtuple.

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) –


SetCol(self, n)

Set the column of the coordinate.

Parameters:n (int) –


SetRow(self, n)

Set the row of the coordinate.

Parameters:n (int) –


__getitem__(self, idx)


__len__(self)


__nonzero__(self)


__reduce__(self)


__repr__(self)


__setitem__(self, idx, val)


__str__(self)


__ne__(self)

Inequality operator.

Parameters:other (wx.grid.GridCellCoords) –


__eq__(self)

Equality operator.

Parameters:other (wx.grid.GridCellCoords) –

Properties



Col

See GetCol and SetCol



Row

See GetRow and SetRow