.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.dataview.DataViewItem:

==========================================================================================================================================
|phoenix_title|  **wx.dataview.DataViewItem**
==========================================================================================================================================

:ref:`wx.dataview.DataViewItem`  is a small opaque class that represents an item in a :ref:`wx.dataview.DataViewCtrl`  in a persistent way, i.e.          

independent of the position of the item in the control or changes to its contents. 

It must hold a unique ``ID`` of type `void`  in its only field and can be converted to and from it. 

If the ``ID`` is ``None`` the :ref:`wx.dataview.DataViewItem`  is invalid and :meth:`wx.dataview.DataViewItem.IsOk`   will return ``False`` which used in many places in the API of :ref:`wx.dataview.DataViewCtrl`  to indicate that e.g. no item was found. An ``ID`` of ``None`` is also used to indicate the invisible root. Examples for this are :meth:`wx.dataview.DataViewModel.GetParent`   and :meth:`wx.dataview.DataViewModel.GetChildren` . 









|

|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>DataViewItem</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.dataview.DataViewItem_inheritance.png" alt="Inheritance diagram of DataViewItem" 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.dataview.DataViewItem.html" title="wx.dataview.DataViewItem" alt="" coords="5,5,207,35"/> </map> 
   </p>
   </div>

|


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

================================================================================ ================================================================================
:meth:`~wx.dataview.DataViewItem.__init__`                                       Constructor.
:meth:`~wx.dataview.DataViewItem.GetID`                                          Returns the ``ID``.
:meth:`~wx.dataview.DataViewItem.IsOk`                                           Returns ``True`` if the ``ID`` is not ``None``.
:meth:`~wx.dataview.DataViewItem.__bool__`                                       
:meth:`~wx.dataview.DataViewItem.__eq__`                                         
:meth:`~wx.dataview.DataViewItem.__hash__`                                       
:meth:`~wx.dataview.DataViewItem.__ne__`                                         
:meth:`~wx.dataview.DataViewItem.__nonzero__`                                    
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.dataview.DataViewItem.ID`                                             See :meth:`~wx.dataview.DataViewItem.GetID`
================================================================================ ================================================================================


|


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


.. class:: wx.dataview.DataViewItem(object)

   **Possible constructors**::

       DataViewItem()
       
       DataViewItem(item)
       
       DataViewItem(id)
       
   
   DataViewItem is a small opaque class that represents an item in a
   DataViewCtrl in a persistent way, i.e.



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

      Constructor.                   


      |overload| Overloaded Implementations:

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

      
      **__init__** `(self)`
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, item)`
      
      
      
      
      :param `item`: 
      :type `item`: wx.dataview.DataViewItem
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, id)`
      
      
      
      
      :param `id`: 
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: GetID(self)

      Returns the ``ID``.                   





   .. method:: IsOk(self)

      Returns ``True`` if the ``ID`` is not ``None``.                  

      :rtype: `bool`








   .. method:: __bool__(self)



      :rtype: `int`








   .. method:: __eq__(self, other)



      :rtype: `bool`








   .. method:: __hash__(self)



      :rtype: `long`








   .. method:: __ne__(self, other)



      :rtype: `bool`








   .. method:: __nonzero__(self)



      :rtype: `int`








   .. attribute:: ID

      See :meth:`~wx.dataview.DataViewItem.GetID`

