.. include:: headings.inc .. _GBSpan: ========================================================================================================================================== |phoenix_title| **GBSpan** ========================================================================================================================================== This class is used to hold the row and column spanning attributes of items in a :ref:`GridBagSizer`. | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **GBSpan** .. raw:: html

Inheritance diagram of GBSpan

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~GBSpan.__init__` Default constructor, setting the rowspan and colspan to (1,1) meaning that the item occupies one cell in each direction. :meth:`~GBSpan.Get` Return the rowspan and colspan properties as a tuple. :meth:`~GBSpan.GetColspan` Get the current colspan value. :meth:`~GBSpan.GetRowspan` Get the current rowspan value. :meth:`~GBSpan.Set` Set both the rowspan and colspan properties. :meth:`~GBSpan.SetColspan` Set a new colspan value. :meth:`~GBSpan.SetRowspan` Set a new rowspan value. :meth:`~GBSpan.__getitem__` :meth:`~GBSpan.__len__` :meth:`~GBSpan.__nonzero__` :meth:`~GBSpan.__reduce__` :meth:`~GBSpan.__repr__` :meth:`~GBSpan.__setitem__` :meth:`~GBSpan.__str__` :meth:`~GBSpan.__ne__` Compare inequality of two GBSpans. :meth:`~GBSpan.__eq__` Compare equality of two GBSpans. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~GBSpan.Colspan` See :meth:`~GBSpan.GetColspan` and :meth:`~GBSpan.SetColspan` :attr:`~GBSpan.Rowspan` See :meth:`~GBSpan.GetRowspan` and :meth:`~GBSpan.SetRowspan` :attr:`~GBSpan.colspan` See :meth:`~GBSpan.GetColspan` and :meth:`~GBSpan.SetColspan` :attr:`~GBSpan.rowspan` See :meth:`~GBSpan.GetRowspan` and :meth:`~GBSpan.SetRowspan` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: GBSpan(object) This class is used to hold the row and column spanning attributes of items in a GridBagSizer. **Possible constructors**:: GBSpan() GBSpan(rowspan, colspan) .. method:: __init__(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **__init__** `(self)` Default constructor, setting the rowspan and colspan to (1,1) meaning that the item occupies one cell in each direction. **~~~** **__init__** `(self, rowspan, colspan)` Construct a new :ref:`GBSpan`, setting the `rowspan` and `colspan`. :param `rowspan`: :type `rowspan`: int :param `colspan`: :type `colspan`: int **~~~** .. method:: Get(self) Return the rowspan and colspan properties as a tuple. :rtype: `tuple` :returns: ( `rowspan`, `colspan` ) .. method:: GetColspan(self) Get the current colspan value. :rtype: `int` .. method:: GetRowspan(self) Get the current rowspan value. :rtype: `int` .. method:: Set(self, rowspan=0, colspan=0) Set both the rowspan and colspan properties. .. method:: SetColspan(self, colspan) Set a new colspan value. :param `colspan`: :type `colspan`: int .. method:: SetRowspan(self, rowspan) Set a new rowspan value. :param `rowspan`: :type `rowspan`: 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 GBSpans. :param `o`: :type `o`: GBSpan .. method:: __eq__(self) Compare equality of two GBSpans. :param `o`: :type `o`: GBSpan .. attribute:: Colspan See :meth:`~GBSpan.GetColspan` and :meth:`~GBSpan.SetColspan` .. attribute:: Rowspan See :meth:`~GBSpan.GetRowspan` and :meth:`~GBSpan.SetRowspan` .. attribute:: colspan See :meth:`~GBSpan.GetColspan` and :meth:`~GBSpan.SetColspan` .. attribute:: rowspan See :meth:`~GBSpan.GetRowspan` and :meth:`~GBSpan.SetRowspan`