.. 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.grid.GridCellCoords:

==========================================================================================================================================
|phoenix_title|  **wx.grid.GridCellCoords**
==========================================================================================================================================

Represents coordinates of a grid cell.          

An object of this class is simply a (row, column) pair.           




|

|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>GridCellCoords</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.grid.GridCellCoords_inheritance.png" alt="Inheritance diagram of GridCellCoords" 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.grid.GridCellCoords.html" title="wx.grid.GridCellCoords" alt="" coords="5,5,176,35"/> </map> 
   </p>
   </div>

|


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

================================================================================ ================================================================================
:meth:`~wx.grid.GridCellCoords.__init__`                                         Default constructor initializes the object to invalid state.
:meth:`~wx.grid.GridCellCoords.Get`                                              Return the row and col properties as a tuple.
:meth:`~wx.grid.GridCellCoords.GetCol`                                           Return the column of the coordinate.
:meth:`~wx.grid.GridCellCoords.GetIM`                                            Returns an immutable representation of the ``wx.GridCellCoords`` object, based on ``namedtuple``.
:meth:`~wx.grid.GridCellCoords.GetRow`                                           Return the row of the coordinate.
:meth:`~wx.grid.GridCellCoords.Set`                                              Set the row and column of the coordinate.
:meth:`~wx.grid.GridCellCoords.SetCol`                                           Set the column of the coordinate.
:meth:`~wx.grid.GridCellCoords.SetRow`                                           Set the row of the coordinate.
:meth:`~wx.grid.GridCellCoords.__bool__`                                         
:meth:`~wx.grid.GridCellCoords.__getitem__`                                      
:meth:`~wx.grid.GridCellCoords.__len__`                                          
:meth:`~wx.grid.GridCellCoords.__nonzero__`                                      
:meth:`~wx.grid.GridCellCoords.__reduce__`                                       
:meth:`~wx.grid.GridCellCoords.__repr__`                                         
:meth:`~wx.grid.GridCellCoords.__setitem__`                                      
:meth:`~wx.grid.GridCellCoords.__str__`                                          
:meth:`~wx.grid.GridCellCoords.__ne__`                                           Inequality operator.
:meth:`~wx.grid.GridCellCoords.__eq__`                                           Equality operator.
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.grid.GridCellCoords.Col`                                              See :meth:`~wx.grid.GridCellCoords.GetCol` and :meth:`~wx.grid.GridCellCoords.SetCol`
:attr:`~wx.grid.GridCellCoords.Row`                                              See :meth:`~wx.grid.GridCellCoords.GetRow` and :meth:`~wx.grid.GridCellCoords.SetRow`
================================================================================ ================================================================================


|


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


.. class:: wx.grid.GridCellCoords(object)

   **Possible constructors**::

       GridCellCoords()
       
       GridCellCoords(row, col)
       
   
   Represents coordinates of a grid cell.



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



      |overload| Overloaded Implementations:

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

      
      **__init__** `(self)`
      
      Default constructor initializes the object to invalid state.                  
      
      Initially the row and column are both invalid (-1) and so :meth:`operator!`   for an uninitialized :ref:`wx.grid.GridCellCoords`  returns ``False``.                   
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, row, col)`
      
      Constructor taking a row and a column.                  
      
      
      :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)

      Return the column of the coordinate.                  

      :rtype: `int`








   .. method:: GetIM(self)

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



   .. method:: GetRow(self)

      Return the row of the coordinate.                  

      :rtype: `int`








   .. method:: Set(self, row, col)

      Set the row and column of the coordinate.                  


      :param `row`: 
      :type `row`: int
      :param `col`: 
      :type `col`: int







   .. method:: SetCol(self, n)

      Set the column of the coordinate.                  


      :param `n`: 
      :type `n`: int







   .. method:: SetRow(self, n)

      Set the row of the coordinate.                  


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

      Inequality operator.                  


      :param `other`: 
      :type `other`: wx.grid.GridCellCoords







   .. method:: __eq__(self)

      Equality operator.                  


      :param `other`: 
      :type `other`: wx.grid.GridCellCoords







   .. attribute:: Col

      See :meth:`~wx.grid.GridCellCoords.GetCol` and :meth:`~wx.grid.GridCellCoords.SetCol`


   .. attribute:: Row

      See :meth:`~wx.grid.GridCellCoords.GetRow` and :meth:`~wx.grid.GridCellCoords.SetRow`

