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

==========================================================================================================================================
|phoenix_title|  **wx.Position**
==========================================================================================================================================

This class represents the position of an item in any kind of grid of rows and columns such as :ref:`wx.GridBagSizer`, or :ref:`wx.HVScrolledWindow`.          







         



.. seealso:: :ref:`wx.Point`, :ref:`wx.Size`    







|

|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>Position</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.Position_inheritance.png" alt="Inheritance diagram of Position" 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.Position.html" title="wx.Position" alt="" coords="5,5,103,35"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.Position.__init__`                                                    Construct a new :ref:`wx.Position`, setting the row and column to the default value of (0, 0).
:meth:`~wx.Position.Get`                                                         Return the row and col properties as a tuple.
:meth:`~wx.Position.GetCol`                                                      A synonym for :meth:`~Position.GetColumn` .
:meth:`~wx.Position.GetColumn`                                                   Get the current row value.
:meth:`~wx.Position.GetIM`                                                       Returns an immutable representation of the ``wx.Position`` object, based on ``namedtuple``.
:meth:`~wx.Position.GetRow`                                                      Get the current row value.
:meth:`~wx.Position.SetCol`                                                      A synonym for :meth:`~Position.SetColumn` .
:meth:`~wx.Position.SetColumn`                                                   Set a new column value.
:meth:`~wx.Position.SetRow`                                                      Set a new row value.
:meth:`~wx.Position.__bool__`                                                    
:meth:`~wx.Position.__getitem__`                                                 
:meth:`~wx.Position.__len__`                                                     
:meth:`~wx.Position.__nonzero__`                                                 
:meth:`~wx.Position.__reduce__`                                                  
:meth:`~wx.Position.__repr__`                                                    
:meth:`~wx.Position.__setitem__`                                                 
:meth:`~wx.Position.__str__`                                                     
:meth:`~wx.Position.__ne__`                                                      
:meth:`~wx.Position.__add__`                                                     
:meth:`~wx.Position.__iadd__`                                                    
:meth:`~wx.Position.__sub__`                                                     
:meth:`~wx.Position.__isub__`                                                    
:meth:`~wx.Position.__eq__`                                                      
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.Position.Col`                                                         See :meth:`~wx.Position.GetCol` and :meth:`~wx.Position.SetCol`
:attr:`~wx.Position.Column`                                                      See :meth:`~wx.Position.GetColumn` and :meth:`~wx.Position.SetColumn`
:attr:`~wx.Position.IM`                                                          See :meth:`~wx.Position.GetIM`
:attr:`~wx.Position.Row`                                                         See :meth:`~wx.Position.GetRow` and :meth:`~wx.Position.SetRow`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.Position(object)

   **Possible constructors**::

       Position()
       
       Position(row, col)
       
   
   This class represents the position of an item in any kind of grid of
   rows and columns such as GridBagSizer, or HVScrolledWindow.



   .. method:: __init__(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self)`
      
      Construct a new :ref:`wx.Position`, setting the row and column to the default value of (0, 0).                   
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, row, col)`
      
      Construct a new :ref:`wx.Position`, setting the row and column to the value of (`row`, `col`).                  
      
      
      :param `row`: 
      :type `row`: int
      :param `col`: 
      :type `col`: int
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: Get(self)

      Return the row and col properties as a tuple. 

      :rtype: `tuple`







      :returns: 

         ( `row`, `col` ) 








   .. method:: GetCol(self)

      A synonym for :meth:`GetColumn` .                  

      :rtype: `int`








   .. method:: GetColumn(self)

      Get the current row value.                  

      :rtype: `int`








   .. method:: GetIM(self)

      Returns an immutable representation of the ``wx.Position`` 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.Position``
      with a simple statement like this: ``obj = wx.Position(imObj)``.



   .. method:: GetRow(self)

      Get the current row value.                  

      :rtype: `int`








   .. method:: SetCol(self, column)

      A synonym for :meth:`SetColumn` .                  


      :param `column`: 
      :type `column`: int







   .. method:: SetColumn(self, column)

      Set a new column value.                  


      :param `column`: 
      :type `column`: int







   .. method:: SetRow(self, row)

      Set a new row value.                  


      :param `row`: 
      :type `row`: 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)




      :param `pos`: 
      :type `pos`: wx.Position







   .. method:: __add__(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **__add__** `(self)`
      
      
      
      
      :param `pos`: 
      :type `pos`: wx.Position
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__add__** `(self)`
      
      
      
      
      :param `size`: 
      :type `size`: wx.Size
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: __iadd__(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **__iadd__** `(self)`
      
      
      
      
      :param `pos`: 
      :type `pos`: wx.Position
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__iadd__** `(self)`
      
      
      
      
      :param `size`: 
      :type `size`: wx.Size
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: __sub__(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **__sub__** `(self)`
      
      
      
      
      :param `pos`: 
      :type `pos`: wx.Position
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__sub__** `(self)`
      
      
      
      
      :param `size`: 
      :type `size`: wx.Size
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: __isub__(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **__isub__** `(self)`
      
      
      
      
      :param `pos`: 
      :type `pos`: wx.Position
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__isub__** `(self)`
      
      
      
      
      :param `size`: 
      :type `size`: wx.Size
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: __eq__(self)




      :param `pos`: 
      :type `pos`: wx.Position







   .. attribute:: Col

      See :meth:`~wx.Position.GetCol` and :meth:`~wx.Position.SetCol`


   .. attribute:: Column

      See :meth:`~wx.Position.GetColumn` and :meth:`~wx.Position.SetColumn`


   .. attribute:: IM

      See :meth:`~wx.Position.GetIM`


   .. attribute:: Row

      See :meth:`~wx.Position.GetRow` and :meth:`~wx.Position.SetRow`

