Phoenix Logo

phoenix_title 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 Class Hierarchy

Inheritance diagram for class Position:

method_summary Methods Summary

__init__ Construct a new wx.Position, setting the row and column to the default value of (0, 0).
Get Return the row and col properties as a tuple.
GetCol A synonym for GetColumn .
GetColumn Get the current row value.
GetIM Returns an immutable representation of the wx.Position object, based on namedtuple.
GetRow Get the current row value.
SetCol A synonym for SetColumn .
SetColumn Set a new column value.
SetRow Set a new row value.
__getitem__  
__len__  
__nonzero__  
__reduce__  
__repr__  
__setitem__  
__str__  
__ne__  
__add__  
__iadd__  
__sub__  
__isub__  
__eq__  

property_summary Properties Summary

Col See GetCol and SetCol
Column See GetColumn and SetColumn
IM See GetIM
Row See GetRow and SetRow

api Class API



class wx.Position(object)

Possible constructors:

Position()

Position(row, col)

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)

overload Overloaded Implementations:



__init__ (self)

Construct a new wx.Position, setting the row and column to the default value of (0, 0).



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





Get(self)

Return the row and col properties as a tuple.

Return type:tuple
Returns:( row, col )


GetCol(self)

A synonym for GetColumn .

Return type:int


GetColumn(self)

Get the current row value.

Return type:int


GetIM(self)

Returns an immutable representation of the wx.Position 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.Position with a simple statement like this: obj = wx.Position(imObj).



GetRow(self)

Get the current row value.

Return type:int


SetCol(self, column)

A synonym for SetColumn .

Parameters:column (int) –


SetColumn(self, column)

Set a new column value.

Parameters:column (int) –


SetRow(self, row)

Set a new row value.

Parameters:row (int) –


__getitem__(self, idx)


__len__(self)


__nonzero__(self)


__reduce__(self)


__repr__(self)


__setitem__(self, idx, val)


__str__(self)


__ne__(self)
Parameters:pos (wx.Position) –


__add__(self, *args, **kw)

overload Overloaded Implementations:



__add__ (self)

Parameters:pos (wx.Position) –



__add__ (self)

Parameters:size (wx.Size) –





__iadd__(self, *args, **kw)

overload Overloaded Implementations:



__iadd__ (self)

Parameters:pos (wx.Position) –



__iadd__ (self)

Parameters:size (wx.Size) –





__sub__(self, *args, **kw)

overload Overloaded Implementations:



__sub__ (self)

Parameters:pos (wx.Position) –



__sub__ (self)

Parameters:size (wx.Size) –





__isub__(self, *args, **kw)

overload Overloaded Implementations:



__isub__ (self)

Parameters:pos (wx.Position) –



__isub__ (self)

Parameters:size (wx.Size) –





__eq__(self)
Parameters:pos (wx.Position) –

Properties



Col

See GetCol and SetCol



Column

See GetColumn and SetColumn



IM

See GetIM



Row

See GetRow and SetRow