phoenix_title wx.dataview.DataViewTreeCtrl

This class is a wx.dataview.DataViewCtrl which internally uses a wx.dataview.DataViewTreeStore and forwards most of its API to that class.

Additionally, it uses a wx.ImageList to store a list of icons.

The main purpose of this class is to provide a simple upgrade path for code using wx.TreeCtrl.

^^

styles Window Styles

This class supports the following styles:

See wx.dataview.DataViewCtrl for the list of supported styles. ^^

^^

events Events Emitted by this Class

Event macros for events emitted by this class:

See wx.dataview.DataViewCtrl for the list of events emitted by this class. ^^

New in version 2.9.0.


class_hierarchy Class Hierarchy

Inheritance diagram for class DataViewTreeCtrl:

appearance Control Appearance


wxMSW

wxMSW

wxMAC

wxMAC

wxGTK

wxGTK


method_summary Methods Summary

__init__

Default constructor.

AppendContainer

Appends a container to the given parent.

AppendItem

Appends an item to the given parent.

Create

Creates the control and a wx.dataview.DataViewTreeStore as its internal model.

DeleteAllItems

Calls the identical method from wx.dataview.DataViewTreeStore.

DeleteChildren

Calls the identical method from wx.dataview.DataViewTreeStore.

DeleteItem

Calls the identical method from wx.dataview.DataViewTreeStore.

GetChildCount

Calls the identical method from wx.dataview.DataViewTreeStore.

GetClassDefaultAttributes

GetImageList

Returns the image list.

GetItemData

Calls the identical method from wx.dataview.DataViewTreeStore.

GetItemExpandedIcon

Calls the identical method from wx.dataview.DataViewTreeStore.

GetItemIcon

Calls the identical method from wx.dataview.DataViewTreeStore.

GetItemParent

Returns the item’s parent.

GetItemText

Calls the identical method from wx.dataview.DataViewTreeStore.

GetNthChild

Calls the identical method from wx.dataview.DataViewTreeStore.

GetStore

Returns the store.

InsertContainer

Calls the same method from wx.dataview.DataViewTreeStore but uses an index position in the image list instead of a wx.Icon.

InsertItem

Calls the same method from wx.dataview.DataViewTreeStore but uses an index position in the image list instead of a wx.Icon.

IsContainer

Returns True if item is a container.

PrependContainer

Calls the same method from wx.dataview.DataViewTreeStore but uses an index position in the image list instead of a wx.Icon.

PrependItem

Calls the same method from wx.dataview.DataViewTreeStore but uses an index position in the image list instead of a wx.Icon.

SetImageList

Sets the image list.

SetItemData

Calls the identical method from wx.dataview.DataViewTreeStore.

SetItemExpandedIcon

Calls the identical method from wx.dataview.DataViewTreeStore.

SetItemIcon

Calls the identical method from wx.dataview.DataViewTreeStore.

SetItemText

Calls the identical method from wx.dataview.DataViewTreeStore.


property_summary Properties Summary

ImageList

See GetImageList and SetImageList

Store

See GetStore


api Class API

class wx.dataview.DataViewTreeCtrl(DataViewCtrl)

Possible constructors:

DataViewTreeCtrl()

DataViewTreeCtrl(parent, id=ID_ANY, pos=DefaultPosition,
                 size=DefaultSize, style=DV_NO_HEADER|DV_ROW_LINES,
                 validator=DefaultValidator)

This class is a DataViewCtrl which internally uses a DataViewTreeStore and forwards most of its API to that class.


Methods

__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self)

Default constructor.



__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=DV_NO_HEADER|DV_ROW_LINES, validator=DefaultValidator)

Constructor.

Calls Create .

Parameters:





AppendContainer(self, parent, text, icon=-1, expanded=-1, data=None)

Appends a container to the given parent.

Parameters:
Return type:

wx.dataview.DataViewItem



AppendItem(self, parent, text, icon=-1, data=None)

Appends an item to the given parent.

Parameters:
Return type:

wx.dataview.DataViewItem



Create(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=DV_NO_HEADER|DV_ROW_LINES, validator=DefaultValidator)

Creates the control and a wx.dataview.DataViewTreeStore as its internal model.

The default tree column created by this method is an editable column using wx.dataview.DataViewIconTextRenderer as its renderer.

Parameters:
Return type:

bool



DeleteAllItems(self)

Calls the identical method from wx.dataview.DataViewTreeStore.



DeleteChildren(self, item)

Calls the identical method from wx.dataview.DataViewTreeStore.

Parameters:

item (wx.dataview.DataViewItem) –



DeleteItem(self, item)

Calls the identical method from wx.dataview.DataViewTreeStore.

Parameters:

item (wx.dataview.DataViewItem) –



GetChildCount(self, parent)

Calls the identical method from wx.dataview.DataViewTreeStore.

Parameters:

parent (wx.dataview.DataViewItem) –

Return type:

int



static GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)
Parameters:

variant (WindowVariant) –

Return type:

VisualAttributes



GetImageList(self)

Returns the image list.

Return type:

ImageList



GetItemData(self, item)

Calls the identical method from wx.dataview.DataViewTreeStore.

Parameters:

item (wx.dataview.DataViewItem) –

Return type:

ClientData



GetItemExpandedIcon(self, item)

Calls the identical method from wx.dataview.DataViewTreeStore.

Parameters:

item (wx.dataview.DataViewItem) –

Return type:

Icon



GetItemIcon(self, item)

Calls the identical method from wx.dataview.DataViewTreeStore.

Parameters:

item (wx.dataview.DataViewItem) –

Return type:

Icon



GetItemParent(self, item)

Returns the item’s parent.

Parameters:

item (wx.dataview.DataViewItem) –

Return type:

wx.dataview.DataViewItem

New in version 4.1/wxWidgets-3.1.6.



GetItemText(self, item)

Calls the identical method from wx.dataview.DataViewTreeStore.

Parameters:

item (wx.dataview.DataViewItem) –

Return type:

string



GetNthChild(self, parent, pos)

Calls the identical method from wx.dataview.DataViewTreeStore.

Parameters:
Return type:

wx.dataview.DataViewItem



GetStore(self)

Returns the store.

Return type:

wx.dataview.DataViewTreeStore



InsertContainer(self, parent, previous, text, icon=-1, expanded=-1, data=None)

Calls the same method from wx.dataview.DataViewTreeStore but uses an index position in the image list instead of a wx.Icon.

Parameters:
Return type:

wx.dataview.DataViewItem



InsertItem(self, parent, previous, text, icon=-1, data=None)

Calls the same method from wx.dataview.DataViewTreeStore but uses an index position in the image list instead of a wx.Icon.

Parameters:
Return type:

wx.dataview.DataViewItem



IsContainer(self, item)

Returns True if item is a container.

Parameters:

item (wx.dataview.DataViewItem) –

Return type:

bool



PrependContainer(self, parent, text, icon=-1, expanded=-1, data=None)

Calls the same method from wx.dataview.DataViewTreeStore but uses an index position in the image list instead of a wx.Icon.

Parameters:
Return type:

wx.dataview.DataViewItem



PrependItem(self, parent, text, icon=-1, data=None)

Calls the same method from wx.dataview.DataViewTreeStore but uses an index position in the image list instead of a wx.Icon.

Parameters:
Return type:

wx.dataview.DataViewItem



SetImageList(self, imagelist)

Sets the image list.

Parameters:

imagelist (wx.ImageList) –



SetItemData(self, item, data)

Calls the identical method from wx.dataview.DataViewTreeStore.

Parameters:


SetItemExpandedIcon(self, item, icon)

Calls the identical method from wx.dataview.DataViewTreeStore.

Parameters:


SetItemIcon(self, item, icon)

Calls the identical method from wx.dataview.DataViewTreeStore.

Parameters:


SetItemText(self, item, text)

Calls the identical method from wx.dataview.DataViewTreeStore.

Parameters:

Properties

ImageList

See GetImageList and SetImageList



Store

See GetStore