wxAuiNotebook
generated from ../src/mod_gui/control/auibook.cppwxAuiNotebook is a notebook control which implements many features common in applications with dockable panes. Specifically, wxAuiNotebook implements functionality which allows the user to rearrange tab order via drag-and-drop, split the tab window into many different splitter configurations, and toggle through different themes to customize the control's look and feel.
Constants
| Name | Description |
|---|---|
| wxAUI_NB_DEFAULT_STYLE | Defined as TOP | TAB_SPLIT | TAB_MOVE | SCROLL_BUTTONS | CLOSE_ON_ACTIVE_TAB |
| wxAUI_NB_TAB_SPLIT | Allows the tab control to be split by dragging a tab. |
| wxAUI_NB_TAB_MOVE | Allows a tab to be moved horizontally by dragging. |
| wxAUI_NB_TAB_EXTERNAL_MOVE | Allows a tab to be moved to another tab control. |
| wxAUI_NB_TAB_FIXED_WIDTH | With this style, all tabs have the same width. |
| wxAUI_NB_SCROLL_BUTTONS | With this style, left and right scroll buttons are displayed. |
| wxAUI_NB_WINDOWLIST_BUTTON | With this style, a drop-down list of windows is available. |
| wxAUI_NB_CLOSE_BUTTON | With this style, a close button is available on the tab bar. |
| wxAUI_NB_CLOSE_ON_ACTIVE_TAB | With this style, the close button is visible on the active tab. |
| wxAUI_NB_CLOSE_ON_ALL_TABS | With this style, the close button is visible on all tabs. |
| wxAUI_NB_TOP | With this style, tabs are drawn along the top of the notebook. |
| wxAUI_NB_BOTTOM | With this style, tabs are drawn along the bottom of the notebook. |
Constructor
wxAuiNotebook
wxAuiNotebook()
wxAuiNotebook(Parent,
Id = wxID.ANY)
| Name | Type | Default | Description |
|---|---|---|---|
| Parent | wxWindow | ||
| Id | Integer | wxID.ANY |
Constructs a new wxAuiNotebook.
Properties
| Name | Type | Description |
|---|---|---|
pageCount ![]() |
Integer | Returns the number of pages. |
| selection | Integer | Get/Set the index of the active page. |
| tabCtrlHeight | Integer | Get/Set the height of the tab control. |
Methods
addPage
addPage(Win,
Caption,
Select = false,
Bitmap = null) : Boolean
| Name | Type | Default | Description |
|---|---|---|---|
| Win | wxWindow | ||
| Caption | String | ||
| Select | Boolean | false | |
| Bitmap | wxBitmap | null |
Adds a page. If the Select parameter is true, calling this will generate a page change event.
advanceSelection
advanceSelection(Forward = true)
| Name | Type | Default | Description |
|---|---|---|---|
| Forward | Boolean | true |
Sets the selection to the next or previous page.
create
create(Parent,
Id = wxID.ANY,
Pos = wxDefaultPosition,
Size = wxDefaultSize,
Style = 0) : Boolean
| Name | Type | Default | Description |
|---|---|---|---|
| Parent | wxWindow | The parent of this control | |
| Id | Integer | wxID.ANY | The id of this control |
| Pos | wxPoint | wxDefaultPosition | The position |
| Size | wxSize | wxDefaultSize | The size |
| Style | Integer | 0 | The style |
Creates the notebook window.
deletePage
deletePage(Page) : Boolean
| Name | Type | Default | Description |
|---|---|---|---|
| Page | Integer | The index of the page |
Deletes a page at the given index. Calling this method will generate a page change event.
getHeightForPageHeight
getHeightForPageHeight(PageHeight) : Integer
| Name | Type | Default | Description |
|---|---|---|---|
| PageHeight | Integer |
Returns the desired height of the notebook for the given page height. Use this to fit the notebook to a given page size.
getPage
getPage(Index) : wxWindow
| Name | Type | Default | Description |
|---|---|---|---|
| Index | Integer |
Returns the page specified by the given index.
getPageBitmap
getPageBitmap(Index) : wxBitmap
| Name | Type | Default | Description |
|---|---|---|---|
| Index | Integer |
Returns the tab bitmap for the page.
getPageIndex
getPageIndex(Win) : Integer
| Name | Type | Default | Description |
|---|---|---|---|
| Win | wxWindow |
Returns the page index for the specified window. If the window is not found in the notebook, -1 is returned.
getPageText
getPageText(Index) : String
| Name | Type | Default | Description |
|---|---|---|---|
| Index | Integer |
Returns the tab label for the page.
insertPage
insertPage(Index,
Win,
Caption,
Select = false,
Bitmap = null) : Boolean
| Name | Type | Default | Description |
|---|---|---|---|
| Index | Integer | ||
| Win | wxWindow | ||
| Caption | String | ||
| Select | Boolean | false | |
| Bitmap | wxBitmap | null |
insertPage is similar to addPage, but allows the ability to specify the insert location. If the Select parameter is true, calling this will generate a page change event.
removePage
removePage(Page) : Boolean
| Name | Type | Default | Description |
|---|---|---|---|
| Page | Integer | The index of the page |
Removes a page at the given index.
setFont
setFont(Font) : Boolean
| Name | Type | Default | Description |
|---|---|---|---|
| Font | wxFont |
Sets the font for drawing the tab labels, using a bold version of the font for selected tab labels.
setMeasuringFont
setMeasuringFont(Font)
| Name | Type | Default | Description |
|---|---|---|---|
| Font | wxFont |
Sets the font for measuring tab labels.
setNormalFont
setNormalFont(Font)
| Name | Type | Default | Description |
|---|---|---|---|
| Font | wxFont |
Sets the font for drawing unselected tab labels.
setPageBitmap
setPageBitmap(Page,
Bitmap) : Boolean
| Name | Type | Default | Description |
|---|---|---|---|
| Page | Integer | The index of the page | |
| Bitmap | wxBitmap |
Sets the bitmap for the page. To remove a bitmap from the tab caption, pass null.
setPageText
setPageText(Page,
Text) : Boolean
| Name | Type | Default | Description |
|---|---|---|---|
| Page | Integer | The index of the page | |
| Text | String |
Sets the tab label.
setSelectedFont
setSelectedFont(Font)
| Name | Type | Default | Description |
|---|---|---|---|
| Font | wxFont |
Sets the font for drawing selected tab labels.
setUniformBitmapSize
setUniformBitmapSize(Size)
| Name | Type | Default | Description |
|---|---|---|---|
| Size | wxSize |
setUniformBitmapSize ensures that all tabs will have the same height, even if some tabs don't have bitmaps. Passing wxDefaultSize to this function will instruct the control to use dynamic tab height, which is the default behaviour. Under the default behaviour, when a tab with a large bitmap is added, the tab control's height will automatically increase to accommodate the larger bitmap.
showWindowMenu
showWindowMenu() : Boolean
Shows the window menu for the active tab control associated with this notebook, and returns true if a selection was made.
split
split(Page,
Direction)
| Name | Type | Default | Description |
|---|---|---|---|
| Page | Integer | ||
| Direction | Integer |
split performs a split operation programmatically. The argument page indicates the page that will be split off. This page will also become the active page after the split. The direction argument specifies where the pane should go, it should be one of the following: wxDirection.TOP, wxDirection.BOTTOM, wxDirection.LEFT, or wxDirection.RIGHT.

© 2002 - 2007 Franky Braem.