wx.Position¶
This class represents the position of an item in any kind of grid of rows and columns such as wx.GridBagSizer, or wx.HVScrolledWindow.
Class Hierarchy¶
Methods Summary¶
Construct a new wx.Position, setting the row and column to the default value of (0, 0). |
|
Return the row and col properties as a tuple. |
|
A synonym for |
|
Get the current row value. |
|
Returns an immutable representation of the |
|
Get the current row value. |
|
A synonym for |
|
Set a new column value. |
|
Set a new row value. |
|
Properties Summary¶
See |
|
Class API¶
- class wx.Position(object)¶
Possible constructors:
Position() -> None Position(row, col) -> None
This class represents the position of an item in any kind of grid of rows and columns such as GridBagSizer, or HVScrolledWindow.
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self)
Construct a new wx.Position, setting the row and column to the default value of (0, 0).
- Return type:
None
__init__ (self, row, col)
Construct a new wx.Position, setting the row and column to the value of (row, col).
- Parameters:
row (int)
col (int)
- Return type:
None
- Get(self)¶
Return the row and col properties as a tuple.
- Return type:
Any
- GetColumn(self)¶
Get the current row value.
- Return type:
int
- GetIM(self)¶
Returns an immutable representation of the
wx.Position
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.Position
with a simple statement like this:obj = wx.Position(imObj)
.
- GetRow(self)¶
Get the current row value.
- Return type:
int
- SetColumn(self, column)¶
Set a new column value.
- Parameters:
column (int)
- Return type:
None
- SetRow(self, row)¶
Set a new row value.
- Parameters:
row (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, pos)¶
- Parameters:
pos (wx.Position)
- Return type:
bool
- __add__(self, *args, **kw)¶
-
__add__ (self, pos)
- Parameters:
pos (wx.Position)
- Return type:
__add__ (self, size)
- Parameters:
size (wx.Size)
- Return type:
- __iadd__(self, *args, **kw)¶
-
__iadd__ (self, pos)
- Parameters:
pos (wx.Position)
- Return type:
__iadd__ (self, size)
- Parameters:
size (wx.Size)
- Return type:
- __sub__(self, *args, **kw)¶
-
__sub__ (self, pos)
- Parameters:
pos (wx.Position)
- Return type:
__sub__ (self, size)
- Parameters:
size (wx.Size)
- Return type:
- __isub__(self, *args, **kw)¶
-
__isub__ (self, pos)
- Parameters:
pos (wx.Position)
- Return type:
__isub__ (self, size)
- Parameters:
size (wx.Size)
- Return type:
- __eq__(self, pos)¶
- Parameters:
pos (wx.Position)
- Return type:
bool
Properties¶