## wxTreebookEvent

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 wxNotebookEvent.

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 wxTreebookEvent::GetSelection.

Derived from

wxBookCtrlBaseEvent
wxNotifyEvent
wxCommandEvent
wxEvent
wxObject

Include files

<treebook.h>

Event handling

To process input from a treebook control, use the following event handler macros to direct input to member functions that take a wxTreebookEvent argument.

EVT_TREEBOOK_PAGE_CHANGED(id, func) | The page selection was changed. Processes a wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED event.
EVT_TREEBOOK_PAGE_CHANGING(id, func) | The page selection is about to be changed. Processes a wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING event. This event can be vetoed.
EVT_TREEBOOK_NODE_COLLAPSED(id, func) | The page node is going to be collapsed. Processes a wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED event.
EVT_TREEBOOK_NODE_EXPANDED(id, func) | The page node is going to be expanded. Processes a wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED event.

See also

wxNotebookEvent, wxTreebook

Members

wxTreebookEvent::wxTreebookEvent
wxTreebookEvent::GetOldSelection
wxTreebookEvent::GetSelection

### wxTreebookEvent::wxTreebookEvent

wxTreebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, int nSel = wxNOT_FOUND, int nOldSel = wxNOT_FOUND)

See also

wxNotebookEvent

### wxTreebookEvent::GetOldSelection

int GetOldSelection() const

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

### wxTreebookEvent::GetSelection

int GetSelection() const

Returns the currently selected page, or wxNOT_FOUND if none was selected.

See also

wxNotebookEvent::GetSelection