.. 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.DataViewListStore: ========================================================================================================================================== |phoenix_title| **wx.dataview.DataViewListStore** ========================================================================================================================================== :ref:`wx.dataview.DataViewListStore` is a specialised :ref:`wx.dataview.DataViewModel` for storing a simple table of data. Since it derives from :ref:`wx.dataview.DataViewIndexListModel` its data is be accessed by row (i.e. by index) instead of only by :ref:`wx.dataview.DataViewItem`. This class actually stores the values (therefore its name) and implements all virtual methods from the base classes so it can be used directly without having to derive any class from it, but it is mostly used from within :ref:`wx.dataview.DataViewListCtrl`. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class DataViewListStore:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.dataview.DataViewListStore.__init__` Constructor. :meth:`~wx.dataview.DataViewListStore.AppendColumn` Appends a data column. :meth:`~wx.dataview.DataViewListStore.AppendItem` Appends an item (=row) and fills it with `values`. :meth:`~wx.dataview.DataViewListStore.DeleteAllItems` Delete all item (=all rows) in the store. :meth:`~wx.dataview.DataViewListStore.DeleteItem` Delete the item (=row) at position `pos`. :meth:`~wx.dataview.DataViewListStore.GetItemCount` Returns the number of items (=rows) in the control. :meth:`~wx.dataview.DataViewListStore.GetItemData` Returns the client data associated with the item. :meth:`~wx.dataview.DataViewListStore.GetValueByRow` Overridden from :ref:`wx.dataview.DataViewIndexListModel`. :meth:`~wx.dataview.DataViewListStore.InsertColumn` Inserts a data column before `pos`. :meth:`~wx.dataview.DataViewListStore.InsertItem` Inserts an item (=row) and fills it with `values`. :meth:`~wx.dataview.DataViewListStore.PrependColumn` Prepends a data column. :meth:`~wx.dataview.DataViewListStore.PrependItem` Prepends an item (=row) and fills it with `values`. :meth:`~wx.dataview.DataViewListStore.SetItemData` Sets the client data associated with the item. :meth:`~wx.dataview.DataViewListStore.SetValueByRow` Overridden from :ref:`wx.dataview.DataViewIndexListModel`. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.dataview.DataViewListStore.ItemCount` See :meth:`~wx.dataview.DataViewListStore.GetItemCount` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.dataview.DataViewListStore(DataViewIndexListModel) **Possible constructors**:: DataViewListStore() DataViewListStore is a specialised DataViewModel for storing a simple table of data. .. method:: __init__(self) Constructor. .. method:: AppendColumn(self, varianttype) Appends a data column. `variantype` indicates the type of values store in the column. This does not automatically fill in any (default) values in rows which exist in the store already. :param `varianttype`: :type `varianttype`: string .. method:: AppendItem(self, values, data=None) Appends an item (=row) and fills it with `values`. The values must match the values specifies in the column in number and type. No (default) values are filled in automatically. :param `values`: :type `values`: :class:`VariantVector` :param `data`: :type `data`: wx.UIntPtr .. method:: DeleteAllItems(self) Delete all item (=all rows) in the store. .. method:: DeleteItem(self, pos) Delete the item (=row) at position `pos`. :param `pos`: .. method:: GetItemCount(self) Returns the number of items (=rows) in the control. :rtype: `int` .. versionadded:: 2.9.4 .. method:: GetItemData(self, item) Returns the client data associated with the item. :param `item`: :type `item`: wx.dataview.DataViewItem :rtype: `wx.UIntPtr` .. versionadded:: 2.9.4 .. seealso:: :meth:`SetItemData` .. method:: GetValueByRow(self, row, col) Overridden from :ref:`wx.dataview.DataViewIndexListModel`. :param `row`: :type `row`: int :param `col`: :type `col`: int :rtype: `value` .. method:: InsertColumn(self, pos, varianttype) Inserts a data column before `pos`. `variantype` indicates the type of values store in the column. This does not automatically fill in any (default) values in rows which exist in the store already. :param `pos`: :type `pos`: int :param `varianttype`: :type `varianttype`: string .. method:: InsertItem(self, row, values, data=None) Inserts an item (=row) and fills it with `values`. The values must match the values specifies in the column in number and type. No (default) values are filled in automatically. :param `row`: :type `row`: int :param `values`: :type `values`: :class:`VariantVector` :param `data`: :type `data`: wx.UIntPtr .. method:: PrependColumn(self, varianttype) Prepends a data column. `variantype` indicates the type of values store in the column. This does not automatically fill in any (default) values in rows which exist in the store already. :param `varianttype`: :type `varianttype`: string .. method:: PrependItem(self, values, data=None) Prepends an item (=row) and fills it with `values`. The values must match the values specifies in the column in number and type. No (default) values are filled in automatically. :param `values`: :type `values`: :class:`VariantVector` :param `data`: :type `data`: wx.UIntPtr .. method:: SetItemData(self, item, data) Sets the client data associated with the item. Notice that this class does `not` take ownership of the passed in pointer and will not delete it. :param `item`: :type `item`: wx.dataview.DataViewItem :param `data`: :type `data`: wx.UIntPtr .. versionadded:: 2.9.4 .. seealso:: :meth:`GetItemData` .. method:: SetValueByRow(self, value, row, col) Overridden from :ref:`wx.dataview.DataViewIndexListModel`. :param `value`: :type `value`: DVCVariant :param `row`: :type `row`: int :param `col`: :type `col`: int :rtype: `bool` .. attribute:: ItemCount See :meth:`~wx.dataview.DataViewListStore.GetItemCount`