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

Inheritance diagram for class
DataViewItem:
|
|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() -> None
DataViewItem(item : DataViewItem) -> None
DataViewItem(id : Any) -> None
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:`
`
**__init__** `(self)`
:rtype: `None`
:html:`
`
**__init__** `(self, item : DataViewItem)`
:param `item`:
:type `item`: wx.dataview.DataViewItem
:rtype: `None`
:html:`
`
**__init__** `(self, id : Any)`
:param `id`:
:rtype: `None`
:html:`
`
.. method:: GetID(self)
Returns the ``ID``.
:rtype: `Any`
.. method:: IsOk(self)
Returns ``True`` if the ``ID`` is not ``None``.
:rtype: `bool`
.. method:: __bool__(self)
:rtype: `int`
.. method:: __eq__(self, other: DataViewItem)
:rtype: `bool`
.. method:: __hash__(self)
:rtype: `int`
.. method:: __ne__(self, other: DataViewItem)
:rtype: `bool`
.. method:: __nonzero__(self)
:rtype: `int`
.. attribute:: ID
See :meth:`~wx.dataview.DataViewItem.GetID`