.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.GBSpan:
==========================================================================================================================================
|phoenix_title| **wx.GBSpan**
==========================================================================================================================================
This class is used to hold the row and column spanning attributes of items in a :ref:`wx.GridBagSizer`.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

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