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() -> None
DataViewTreeCtrl(parent : Window, id: int=ID_ANY, pos:
Point=DefaultPosition, size: Size=DefaultSize, style:
int=DV_NO_HEADER|DV_ROW_LINES, validator: Validator=DefaultValidator) ->
None
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.
None
__init__ (self, parent : Window, id: int=ID_ANY, pos: Point=DefaultPosition, size: Size=DefaultSize, style: int=DV_NO_HEADER|DV_ROW_LINES, validator: Validator=DefaultValidator)
Constructor.
Calls Create
.
parent (wx.Window) –
id (wx.WindowID) –
pos (wx.Point) –
size (wx.Size) –
style (long) –
validator (wx.Validator) –
None
AppendContainer
(self, parent : DataViewItem, text : str, icon: int=-1, expanded: int=-1, data: Optional[ClientData]=None)¶Appends a container to the given parent.
parent (wx.dataview.DataViewItem) –
text (string) –
icon (int) –
expanded (int) –
data (ClientData) –
AppendItem
(self, parent : DataViewItem, text : str, icon: int=-1, data: Optional[ClientData]=None)¶Appends an item to the given parent.
parent (wx.dataview.DataViewItem) –
text (string) –
icon (int) –
data (ClientData) –
Create
(self, parent : Window, id: int=ID_ANY, pos: Point=DefaultPosition, size: Size=DefaultSize, style: int=DV_NO_HEADER|DV_ROW_LINES, validator: 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.
None
DeleteChildren
(self, item : DataViewItem)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
None
DeleteItem
(self, item : DataViewItem)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
None
GetChildCount
(self, parent : DataViewItem)¶Calls the identical method from wx.dataview.DataViewTreeStore.
parent (wx.dataview.DataViewItem) –
int
GetClassDefaultAttributes
(variant: WindowVariant=WINDOW_VARIANT_NORMAL)¶variant (WindowVariant) –
VisualAttributes
GetItemData
(self, item : DataViewItem)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
ClientData
GetItemExpandedIcon
(self, item : DataViewItem)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
Icon
GetItemIcon
(self, item : DataViewItem)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
Icon
GetItemParent
(self, item : DataViewItem)¶Returns the item’s parent.
item (wx.dataview.DataViewItem) –
New in version 4.1/wxWidgets-3.1.6.
GetItemText
(self, item : DataViewItem)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
str
GetNthChild
(self, parent : DataViewItem, pos : int)¶Calls the identical method from wx.dataview.DataViewTreeStore.
parent (wx.dataview.DataViewItem) –
pos (int) –
GetStore
(self)¶Returns the store.
InsertContainer
(self, parent : DataViewItem, previous : DataViewItem, text : str, icon: int=-1, expanded: int=-1, data: Optional[ClientData]=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 : DataViewItem, previous : DataViewItem, text : str, icon: int=-1, data: Optional[ClientData]=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 : DataViewItem)¶Returns True
if item is a container.
item (wx.dataview.DataViewItem) –
bool
PrependContainer
(self, parent : DataViewItem, text : str, icon: int=-1, expanded: int=-1, data: Optional[ClientData]=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 : DataViewItem, text : str, icon: int=-1, data: Optional[ClientData]=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 : ImageList)¶Sets the image list.
imagelist (wx.ImageList) –
None
SetItemData
(self, item : DataViewItem, data : ClientData)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
data (ClientData) –
None
SetItemExpandedIcon
(self, item : DataViewItem, icon : BitmapBundle)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
icon (wx.BitmapBundle) –
None
SetItemIcon
(self, item : DataViewItem, icon : BitmapBundle)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
icon (wx.BitmapBundle) –
None
SetItemText
(self, item : DataViewItem, text : str)¶Calls the identical method from wx.dataview.DataViewTreeStore.
item (wx.dataview.DataViewItem) –
text (string) –
None
ImageList
¶See GetImageList
and SetImageList