**************** wx.TreebookEvent **************** Inheritance diagram for `wx.TreebookEvent`: | .. inheritance-diagram:: 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 <#GetSelection>`_. .. seealso:: `wx.NotebookEvent `_, `wx.Treebook <../Widgets/wx.Treebook.html>`_ Derived From ^^^^^^^^^^^^^ * `wx.NotifyEvent `_ * `wx.CommandEvent `_ * `wx.Event `_ * `wx.Object <../Widgets/wx.Object.html>`_ 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. ================================================== ================================================== Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetOldSelection <#GetOldSelection>`_ * `GetSelection <#GetSelection>`_ * `SetOldSelection <#SetOldSelection>`_ * `SetSelection <#SetSelection>`_ Class API ========= Methods ^^^^^^^ .. method:: __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 `_ ------------- .. method:: GetOldSelection() Returns the page that was selected before the change, -1 if none was selected. | **Returns:** `int` ------------- .. method:: GetSelection() Returns the currently selected page, or -1 if none was selected. | **Returns:** `int` -------------- .. method:: SetOldSelection(page) Sets the id of the page selected before the change. **Parameters:** * `page` (int) -------------- .. method:: SetSelection(page) Sets the selection member variable. **Parameters:** * `page` (int) .. seealso:: `GetSelection <#GetSelection>`_