See documentation for HyperTreeList
and
CustomTreeCtrl
. This class is just a
simple derivation of the former in order to provide a mostly compatible
class to replace the C++ TreeListCtrl class in Classic, and most
CustomTreeCtrl methods are available here as well via monkey-patched
delegates.
TreeListCtrl
(HTL.HyperTreeList)¶See documentation for HyperTreeList
and
CustomTreeCtrl
. This class is just a
simple derivation of the former in order to provide a mostly compatible
class to replace the C++ TreeListCtrl class in Classic, and most
CustomTreeCtrl methods are available here as well via monkey-patched
delegates.
__init__
(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, agwStyle=wx.TR_DEFAULT_STYLE, validator=wx.DefaultValidator, name="treelistctrl")¶Default class constructor.
parent – parent window. Must not be None
;
id – window identifier. A value of -1 indicates a default value;
pos – the control position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxPython, depending on platform;
size – the control size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxPython, depending on platform;
style – the underlying wx.Control
style;
agwStyle –
the AGW-specific HyperTreeList
window style. This can be a combination
of the following bits:
Window Styles |
Hex Value |
Description |
---|---|---|
|
0x0 |
For convenience to document that no buttons are to be drawn. |
|
0x0 |
For convenience to document that only one item may be selected at a time. Selecting another item causes the current selection, if any, to be deselected. This is the default. |
|
0x1 |
Use this style to show + and - buttons to the left of parent items. |
|
0x4 |
Use this style to hide vertical level connectors. |
|
0x8 |
Use this style to show lines between root nodes. Only applicable if |
|
0x9 |
The set of flags that are closest to the defaults for the native control for a particular toolkit. |
|
0x10 |
Use old Mac-twist style buttons. |
|
0x20 |
Use this style to allow a range of items to be selected. If a second range is selected, the current range, if any, is deselected. |
|
0x40 |
Use this style to allow disjoint items to be selected. (Only partially implemented; may not work in all cases). |
|
0x80 |
Use this style to cause row heights to be just big enough to fit the content. If not set, all rows use the largest row height. The default is that this flag is unset. |
|
0x200 |
Use this style if you wish the user to be able to edit labels in the tree control. |
|
0x400 |
Use this style to draw a contrasting border between displayed rows. |
|
0x800 |
Use this style to suppress the display of the root node, effectively causing the first-level nodes to appear as a series of root nodes. |
|
0x1000 |
Use this style to draw a contrasting border between displayed columns. |
|
0x2000 |
Use this style to have the background colour and the selection highlight extend over the entire horizontal row of the tree control window. |
|
0x4000 |
Only meaningful for checkbox-type items: when a parent item is checked/unchecked its children are checked/unchecked as well. |
|
0x8000 |
Only meaningful for checkbox-type items: when a parent item is checked/unchecked its children are toggled accordingly. |
|
0x10000 |
Only meaningful for checkbox-type items: when a child item is checked/unchecked its parent item is checked/unchecked as well. |
|
0x20000 |
Flag used to align windows (in items with windows) at the same horizontal position. |
|
0x40000 |
Use this style to hide the columns header. |
|
0x80000 |
Flag used to ellipsize long items when the horizontal space for |
|
0x100000 |
|
validator – window validator;
name – window name.