wx.dataview.DataViewTreeStore is a specialised wx.dataview.DataViewModel for storing simple trees very much like wx.TreeCtrl does and it offers a similar API.
This class actually stores the entire tree and the values (therefore its name) and implements all virtual methods from the base class so it can be used directly without having to derive any class from it, but it is mostly used from within wx.dataview.DataViewTreeCtrl.
__init__ |
Constructor. |
AppendContainer |
Append a container. |
AppendItem |
Append an item. |
DeleteAllItems |
Delete all item in the model. |
DeleteChildren |
Delete all children of the item, but not the item itself. |
DeleteItem |
Delete this item. |
GetChildCount |
Return the number of children of item. |
GetItemData |
Returns the client data associated with the item. |
GetItemExpandedIcon |
Returns the icon to display in expanded containers. |
GetItemIcon |
Returns the icon of the item. |
GetItemText |
Returns the text of the item. |
GetNthChild |
Returns the nth child item of item. |
InsertContainer |
Inserts a container after previous. |
InsertItem |
Inserts an item after previous. |
PrependContainer |
Inserts a container before the first child item or parent. |
PrependItem |
Inserts an item before the first child item or parent. |
SetItemData |
Sets the client data associated with the item. |
SetItemExpandedIcon |
Sets the expanded icon for the item. |
SetItemIcon |
Sets the icon for the item. |
wx.dataview.
DataViewTreeStore
(DataViewModel)¶Possible constructors:
DataViewTreeStore()
DataViewTreeStore is a specialised DataViewModel for storing simple trees very much like TreeCtrl does and it offers a similar API.
__init__
(self)¶Constructor.
Creates the invisible root node internally.
AppendContainer
(self, parent, text, icon=NullIcon, expanded=NullIcon, data=None)¶Append a container.
Parameters: |
|
---|---|
Return type: |
AppendItem
(self, parent, text, icon=NullIcon, data=None)¶Append an item.
Parameters: |
|
---|---|
Return type: |
DeleteAllItems
(self)¶Delete all item in the model.
DeleteChildren
(self, item)¶Delete all children of the item, but not the item itself.
Parameters: | item (wx.dataview.DataViewItem) – |
---|
DeleteItem
(self, item)¶Delete this item.
Parameters: | item (wx.dataview.DataViewItem) – |
---|
GetChildCount
(self, parent)¶Return the number of children of item.
Parameters: | parent (wx.dataview.DataViewItem) – |
---|---|
Return type: | int |
GetItemData
(self, item)¶Returns the client data associated with the item.
Parameters: | item (wx.dataview.DataViewItem) – |
---|---|
Return type: | ClientData |
GetItemExpandedIcon
(self, item)¶Returns the icon to display in expanded containers.
Parameters: | item (wx.dataview.DataViewItem) – |
---|---|
Return type: | Icon |
GetItemIcon
(self, item)¶Returns the icon of the item.
Parameters: | item (wx.dataview.DataViewItem) – |
---|---|
Return type: | Icon |
GetItemText
(self, item)¶Returns the text of the item.
Parameters: | item (wx.dataview.DataViewItem) – |
---|---|
Return type: | string |
GetNthChild
(self, parent, pos)¶Returns the nth child item of item.
Parameters: |
|
---|---|
Return type: |
InsertContainer
(self, parent, previous, text, icon=NullIcon, expanded=NullIcon, data=None)¶Inserts a container after previous.
Parameters: |
|
---|---|
Return type: |
InsertItem
(self, parent, previous, text, icon=NullIcon, data=None)¶Inserts an item after previous.
Parameters: |
|
---|---|
Return type: |
PrependContainer
(self, parent, text, icon=NullIcon, expanded=NullIcon, data=None)¶Inserts a container before the first child item or parent.
Parameters: |
|
---|---|
Return type: |
PrependItem
(self, parent, text, icon=NullIcon, data=None)¶Inserts an item before the first child item or parent.
Parameters: |
|
---|---|
Return type: |
SetItemData
(self, item, data)¶Sets the client data associated with the item.
Parameters: |
|
---|
SetItemExpandedIcon
(self, item, icon)¶Sets the expanded icon for the item.
Parameters: |
|
---|
SetItemIcon
(self, item, icon)¶Sets the icon for the item.
Parameters: |
|
---|