.. include:: headings.inc .. _GBPosition: ========================================================================================================================================== |phoenix_title| **GBPosition** ========================================================================================================================================== This class represents the position of an item in a virtual grid of rows and columns managed by a :ref:`GridBagSizer`. | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **GBPosition** .. raw:: html

Inheritance diagram of GBPosition

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~GBPosition.__init__` Default constructor, setting the row and column to (0,0). :meth:`~GBPosition.Get` Return the row and col properties as a tuple. :meth:`~GBPosition.GetCol` Get the current column value. :meth:`~GBPosition.GetRow` Get the current row value. :meth:`~GBPosition.Set` Set both the row and column properties. :meth:`~GBPosition.SetCol` Set a new column value. :meth:`~GBPosition.SetRow` Set a new row value. :meth:`~GBPosition.__getitem__` :meth:`~GBPosition.__len__` :meth:`~GBPosition.__nonzero__` :meth:`~GBPosition.__reduce__` :meth:`~GBPosition.__repr__` :meth:`~GBPosition.__setitem__` :meth:`~GBPosition.__str__` :meth:`~GBPosition.__ne__` Compare inequality of two GBPositions. :meth:`~GBPosition.__eq__` Compare equality of two GBPositions. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~GBPosition.Col` See :meth:`~GBPosition.GetCol` and :meth:`~GBPosition.SetCol` :attr:`~GBPosition.Row` See :meth:`~GBPosition.GetRow` and :meth:`~GBPosition.SetRow` :attr:`~GBPosition.col` See :meth:`~GBPosition.GetCol` and :meth:`~GBPosition.SetCol` :attr:`~GBPosition.row` See :meth:`~GBPosition.GetRow` and :meth:`~GBPosition.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) .. method:: __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 :ref:`GBPosition`, setting the row and column. :param `row`: :type `row`: int :param `col`: :type `col`: int **~~~** .. method:: Get(self) Return the row and col properties as a tuple. :rtype: `tuple` :returns: ( `row`, `col` ) .. method:: GetCol(self) Get the current column value. :rtype: `int` .. method:: GetRow(self) Get the current row value. :rtype: `int` .. method:: Set(self, row=0, col=0) Set both the row and column properties. .. method:: SetCol(self, col) Set a new column value. :param `col`: :type `col`: int .. method:: SetRow(self, row) Set a new row value. :param `row`: :type `row`: int .. method:: __getitem__(self, idx) .. method:: __len__(self) .. method:: __nonzero__(self) .. method:: __reduce__(self) .. method:: __repr__(self) .. method:: __setitem__(self, idx, val) .. method:: __str__(self) .. method:: __ne__(self) Compare inequality of two GBPositions. :param `p`: :type `p`: GBPosition .. method:: __eq__(self) Compare equality of two GBPositions. :param `p`: :type `p`: GBPosition .. attribute:: Col See :meth:`~GBPosition.GetCol` and :meth:`~GBPosition.SetCol` .. attribute:: Row See :meth:`~GBPosition.GetRow` and :meth:`~GBPosition.SetRow` .. attribute:: col See :meth:`~GBPosition.GetCol` and :meth:`~GBPosition.SetCol` .. attribute:: row See :meth:`~GBPosition.GetRow` and :meth:`~GBPosition.SetRow`