Table Of Contents

Previous topic

Frame

Next topic

GBSizerItem

This Page

phoenix_title GBPosition

This class represents the position of an item in a virtual grid of rows and columns managed by a GridBagSizer.


class_hierarchy Inheritance Diagram

Inheritance diagram for class GBPosition

Inheritance diagram of GBPosition


method_summary Methods Summary

__init__ Default constructor, setting the row and column to (0,0).
Get Return the row and col properties as a tuple.
GetCol Get the current column value.
GetRow Get the current row value.
Set Set both the row and column properties.
SetCol Set a new column value.
SetRow Set a new row value.
__getitem__  
__len__  
__nonzero__  
__reduce__  
__repr__  
__setitem__  
__str__  
__ne__ Compare inequality of two GBPositions.
__eq__ Compare equality of two GBPositions.

property_summary Properties Summary

Col See GetCol and SetCol
Row See GetRow and SetRow
col See GetCol and SetCol
row See GetRow and SetRow

api Class API



class GBPosition(object)

This class represents the position of an item in a virtual grid of rows and columns managed by a GridBagSizer.

Possible constructors:

GBPosition()

GBPosition(row, col)

Methods



__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self)

Default constructor, setting the row and column to (0,0).



__init__ (self, row, col)

Construct a new GBPosition, setting the row and 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)

Get the current column value.

Return type:int


GetRow(self)

Get the current row value.

Return type:int


Set(self, row=0, col=0)

Set both the row and column properties.



SetCol(self, col)

Set a new column value.

Parameters:col (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)

Compare inequality of two GBPositions.

Parameters:p (GBPosition) –


__eq__(self)

Compare equality of two GBPositions.

Parameters:p (GBPosition) –

Properties



Col

See GetCol and SetCol



Row

See GetRow and SetRow



col

See GetCol and SetCol



row

See GetRow and SetRow