.. 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

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>GBSpan</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.GBSpan_inheritance.png" alt="Inheritance diagram of GBSpan" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.GBSpan.html" title="wx.GBSpan" alt="" coords="5,5,101,35"/> </map> 
   </p>
   </div>

|


|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()
       
       GBSpan(rowspan, colspan)
       
   
   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:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self)`
      
      Default constructor, setting the rowspan and colspan to (1,1) meaning that the item occupies one cell in each direction.                   
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, rowspan, colspan)`
      
      Construct a new :ref:`wx.GBSpan`, setting the `rowspan`  and `colspan`.                  
      
      
      :param `rowspan`: 
      :type `rowspan`: int
      :param `colspan`: 
      :type `colspan`: int
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. 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=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:: __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`

