Inheritance diagram for wx.Treebook:
This class is an extension of the wx.Notebook class that allows a tree structured set of pages to be shown in a control. A classic example is a netscape preferences dialog that shows a tree of preference sections on the left and select section page on the right.
To use the class simply create it and populate with pages using InsertPage, InsertSubPage, AddPage, AddSubPage .
If your tree is no more than 1 level in depth then you could simply use AddPage and AddSubPage to sequentially populate your tree by adding at every step a page or a subpage to the end of the tree.
See also
Event Name | Description |
---|---|
wx.EVT_TREEBOOK_PAGE_CHANGED(id, func) | The page selection was changed. Processes a wx.wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED event. |
wx.EVT_TREEBOOK_PAGE_CHANGING(id, func) | The page selection is about to be changed. Processes a wx.wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING event. This event can be vetoed. |
wx.EVT_TREEBOOK_NODE_COLLAPSED(id, func) | The page node is going to be collapsed. Processes a wx.wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED event. |
wx.EVT_TREEBOOK_NODE_EXPANDED(id, func) | The page node is going to be expanded. Processes a wx.wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED event. |
Creates an empty wx.Treebook control.
Parameters:
Returns:
Adds a new child-page to the last top-level page.
None could be specified for page to create an empty page.
Parameters:
Returns:
bool
Shortcut for ExpandNode (pageId, False).
Parameters:
Returns:
bool
Expands (collapses) the pageId node. Returns the previous state.
May generate page changing events (if selected page is under the collapsed branch, then its parent is autoselected).
Parameters:
Returns:
bool
Returns the parent page of the given one or wx.NOT_FOUND if this is a top-level page.
Parameters:
Returns:
int
Inserts a sub page under the specified page.
None could be specified for page to create an empty page.
Parameters:
Returns:
bool
Gets the pageId page state – whether it is expanded or collapsed
Parameters:
Returns:
bool