wx.TreebookEvent

Inheritance diagram for wx.TreebookEvent:



Description

This class represents the events generated by a treebook control: currently, there are four of them. The PAGE_CHANGING and PAGE_CHANGED - have exactly the same behaviour as wx.NotebookEvent.

The other two NODE_COLLAPSED and NODE_EXPANDED are triggered when page node in the tree control is collapsed/expanded. The page index could be retreived by calling GetSelection.

Event Handling

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.

Class API

Methods

__init__(commandType=wx.wxEVT_NULL, id=0, nSel=wx.NOT_FOUND, nOldSel=wx.NOT_FOUND)

Constructor.

Parameters:

  • commandType (eventtype)
  • id (int)
  • nSel (int)
  • nOldSel (int)

Returns:

wx.TreebookEvent


GetOldSelection()

Returns the page that was selected before the change, -1 if none was selected.


Returns:

int


GetSelection()

Returns the currently selected page, or -1 if none was selected.


Returns:

int


SetOldSelection(page)

Sets the id of the page selected before the change.

Parameters:

  • page (int)

SetSelection(page)

Sets the selection member variable.

Parameters:

  • page (int)

See also

GetSelection