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.
^^
This class supports the following styles:
See wx.dataview.DataViewCtrl for the list of supported styles. ^^
^^
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.
Default constructor. |
|
Appends a container to the given parent. |
|
Appends an item to the given parent. |
|
Creates the control and a wx.dataview.DataViewTreeStore as its internal model. |
|
Calls the identical method from wx.dataview.DataViewTreeStore. |
|
Calls the identical method from wx.dataview.DataViewTreeStore. |
|
Calls the identical method from wx.dataview.DataViewTreeStore. |
|
Calls the identical method from wx.dataview.DataViewTreeStore. |
|
Returns the image list. |
|
Calls the identical method from wx.dataview.DataViewTreeStore. |
|
Calls the identical method from wx.dataview.DataViewTreeStore. |
|
Calls the identical method from wx.dataview.DataViewTreeStore. |
|
Returns the item’s parent. |
|
Calls the identical method from wx.dataview.DataViewTreeStore. |
|
Calls the identical method from wx.dataview.DataViewTreeStore. |
|
Returns the store. |
|
Calls the same method from wx.dataview.DataViewTreeStore but uses an index position in the image list instead of a wx.Icon. |
|
Calls the same method from wx.dataview.DataViewTreeStore but uses an index position in the image list instead of a wx.Icon. |
|
Returns |
|
Calls the same method from wx.dataview.DataViewTreeStore but uses an index position in the image list instead of a wx.Icon. |
|
Calls the same method from wx.dataview.DataViewTreeStore but uses an index position in the image list instead of a wx.Icon. |
|
Sets the image list. |
|
Calls the identical method from wx.dataview.DataViewTreeStore. |
|
Calls the identical method from wx.dataview.DataViewTreeStore. |
|
Calls the identical method from wx.dataview.DataViewTreeStore. |
|
Calls the identical method from wx.dataview.DataViewTreeStore. |
See |
|
See |
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.
__init__
(self, *args, **kw)¶__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
.
parent (wx.Window) –
id (wx.WindowID) –
pos (wx.Point) –
size (wx.Size) –
style (long) –
validator (wx.Validator) –
AppendContainer
(self, parent, text, icon=-1, expanded=-1, data=None)¶Appends a container to the given parent.
parent (wx.dataview.DataViewItem) –
text (string) –
icon (int) –
expanded (int) –
data (ClientData) –
AppendItem
(self, parent, text, icon=-1, data=None)¶Appends an item to the given parent.
parent (wx.dataview.DataViewItem) –
text (string) –
icon (int) –
data (ClientData) –
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.
parent (wx.Window) –
id (wx.WindowID) –
pos (wx.Point) –
size (wx.Size) –
style (long) –
validator (wx.Validator) –
bool
DeleteAllItems
(self)¶Calls the identical method from wx.dataview.DataViewTreeStore.
DeleteChildren
(self, item)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
DeleteItem
(self, item)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
GetChildCount
(self, parent)¶Calls the identical method from wx.dataview.DataViewTreeStore.
parent (wx.dataview.DataViewItem) –
int
GetClassDefaultAttributes
(variant=WINDOW_VARIANT_NORMAL)¶variant (WindowVariant) –
VisualAttributes
GetItemData
(self, item)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
ClientData
GetItemExpandedIcon
(self, item)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
Icon
GetItemIcon
(self, item)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
Icon
GetItemParent
(self, item)¶Returns the item’s parent.
item (wx.dataview.DataViewItem) –
New in version 4.1/wxWidgets-3.1.6.
GetItemText
(self, item)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
string
GetNthChild
(self, parent, pos)¶Calls the identical method from wx.dataview.DataViewTreeStore.
parent (wx.dataview.DataViewItem) –
pos (int) –
GetStore
(self)¶Returns the store.
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.
parent (wx.dataview.DataViewItem) –
previous (wx.dataview.DataViewItem) –
text (string) –
icon (int) –
expanded (int) –
data (ClientData) –
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.
parent (wx.dataview.DataViewItem) –
previous (wx.dataview.DataViewItem) –
text (string) –
icon (int) –
data (ClientData) –
IsContainer
(self, item)¶Returns True
if item is a container.
item (wx.dataview.DataViewItem) –
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.
parent (wx.dataview.DataViewItem) –
text (string) –
icon (int) –
expanded (int) –
data (ClientData) –
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.
parent (wx.dataview.DataViewItem) –
text (string) –
icon (int) –
data (ClientData) –
SetImageList
(self, imagelist)¶Sets the image list.
imagelist (wx.ImageList) –
SetItemData
(self, item, data)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
data (ClientData) –
SetItemExpandedIcon
(self, item, icon)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
icon (wx.BitmapBundle) –
SetItemIcon
(self, item, icon)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
icon (wx.BitmapBundle) –
SetItemText
(self, item, text)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
text (string) –
ImageList
¶See GetImageList
and SetImageList