AuiNotebook is a notebook control which implements many features common in applications with dockable panes. Specifically, AuiNotebook 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.
An effort has been made to try to maintain an API as similar to that of Notebook
.
The default theme that is used is AuiDefaultTabArt
, which provides a modern, glossy
look and feel. The theme can be changed by calling AuiNotebook.SetArtProvider
.
__init__ |
Default class constructor. |
AddControlToPage |
Adds a control inside a tab (not in the tab area). |
AddPage |
Adds a page. If the select parameter is True , calling this will generate a |
AddTabAreaButton |
Adds a button in the tab area. |
AdvanceSelection |
Cycles through the tabs. |
AssignImageList |
Sets the image list for the AuiNotebook control. |
CalculateNewSplitSize |
Calculates the size of the new split. |
CalculateTabCtrlHeight |
Calculates the tab control area height. |
CloneTabAreaButtons |
Clones the tab area buttons when the AuiNotebook is being split. |
DeletePage |
Deletes a page at the given index. Calling this method will generate a page |
Destroy |
Destroys the window safely. |
DoSizing |
Performs all sizing operations in each tab control. |
EditTab |
Starts the editing of an item label, sending a EVT_AUINOTEBOOK_BEGIN_LABEL_EDIT event. |
EnableTab |
Enables/disables a page in the notebook. |
EnsureVisible |
Ensures the input page index indx is visible. |
FindNextActiveTab |
Finds the next active tab (used mainly when AuiNotebook has inactive/disabled |
FindTab |
Finds the tab control that currently contains the window as well |
FloatPage |
Float the page in page_index by reparenting it to a floating frame. |
GetActiveTabCtrl |
Returns the active tab control. It is called to determine which control |
GetAGWWindowStyleFlag |
Returns the AGW-specific style of the window. |
GetArtProvider |
Returns the associated art provider. |
GetAuiManager |
Returns the associated AuiManager . |
GetCurrentPage |
Returns the currently active page (not the index), or None if none was selected. |
GetDefaultBorder |
Returns the default border style for AuiNotebook . |
GetEnabled |
Returns whether the page specified by the index page_idx is enabled. |
GetHeightForPageHeight |
Gets the height of the notebook for a given page height. |
GetImageList |
Returns the associated image list (if any). |
GetMinMaxTabWidth |
Returns the minimum and the maximum tab widths for AuiNotebook when the |
GetPage |
Returns the page specified by the given index. |
GetPageBitmap |
Returns the tab bitmap for the page. |
GetPageCount |
Returns the number of pages in the notebook. |
GetPageImage |
Returns the image index for the given page. |
GetPageIndex |
Returns the page index for the specified window. If the window is not |
GetPageInfo |
Returns the AuiNotebookPage info structure specified by the given index. |
GetPageText |
Returns the tab label for the page. |
GetPageTextColour |
Returns the tab text colour for the page. |
GetPageTooltip |
Returns the tab tooltip for the page. |
GetSashDClickUnsplit |
Returns whether a splitted AuiNotebook can be unsplitted by double-clicking |
GetSelection |
Returns the index of the currently active page, or -1 if none was selected. |
GetTabContainer |
Returns the instance of AuiTabContainer . |
GetTabCtrlFromPoint |
Returns the tab control at the specified point. |
GetTabCtrlHeight |
Returns the tab control height. |
GetTabFrameFromTabCtrl |
Returns the tab frame associated with a tab control. |
GetTabFrameFromWindow |
Returns the tab frame associated with a window. |
HasCloseButton |
Returns whether a tab displays a close button or not. |
HasMultiplePages |
This method should be overridden to return True if this window has multiple pages. All |
HideAllTabs |
Hides all tabs on the AuiNotebook control. |
InitNotebook |
Contains common initialization code called by all constructors. |
InsertPage |
This is similar to AddPage but allows the ability to specify the insert location. |
IsMouseWellOutsideWindow |
Returns whether the mouse is well outside the AuiNotebook screen rectangle. |
IsRenamable |
Returns whether a tab can be renamed or not. |
LoadPerspective |
Loads a layout which was saved with SavePerspective . |
NotebookPreview |
Generates a preview of all the pages in the notebook (MSW and GTK only). |
OnChildFocusNotebook |
Handles the wx.EVT_CHILD_FOCUS event for AuiNotebook . |
OnCloseFloatingPage |
Handles the wx.EVT_CLOSE event for a floating page in AuiNotebook . |
OnNavigationKeyNotebook |
Handles the wx.EVT_NAVIGATION_KEY event for AuiNotebook . |
OnRenameAccept |
Called by TabTextCtrl , to accept the changes and to send the |
OnRenameCancelled |
Called by TabTextCtrl , to cancel the changes and to send the |
OnSize |
Handles the wx.EVT_SIZE event for AuiNotebook . |
OnTabBeginDrag |
Handles the EVT_AUINOTEBOOK_BEGIN_DRAG event for AuiNotebook . |
OnTabBgDClick |
Handles the EVT_AUINOTEBOOK_BG_DCLICK event for AuiNotebook . |
OnTabButton |
Handles the EVT_AUINOTEBOOK_BUTTON event for AuiNotebook . |
OnTabCancelDrag |
Handles the EVT_AUINOTEBOOK_CANCEL_DRAG event for AuiNotebook . |
OnTabClicked |
Handles the EVT_AUINOTEBOOK_PAGE_CHANGING event for AuiNotebook . |
OnTabDClick |
Handles the EVT_AUINOTEBOOK_TAB_DCLICK event for AuiNotebook . |
OnTabDragMotion |
Handles the EVT_AUINOTEBOOK_DRAG_MOTION event for AuiNotebook . |
OnTabEndDrag |
Handles the EVT_AUINOTEBOOK_END_DRAG event for AuiNotebook . |
OnTabMiddleDown |
Handles the EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN event for AuiNotebook . |
OnTabMiddleUp |
Handles the EVT_AUINOTEBOOK_TAB_MIDDLE_UP event for AuiNotebook . |
OnTabRightDown |
Handles the EVT_AUINOTEBOOK_TAB_RIGHT_DOWN event for AuiNotebook . |
OnTabRightUp |
Handles the EVT_AUINOTEBOOK_TAB_RIGHT_UP event for AuiNotebook . |
ReDockPage |
Re-docks a floating AuiNotebook tab in the original position, when possible. |
RemoveControlFromPage |
Removes a control from a tab (not from the tab area). |
RemoveEmptyTabFrames |
Removes all the empty tab frames. |
RemovePage |
Removes a page, without deleting the window pointer. |
RemoveTabAreaButton |
Removes a button from the tab area. |
ReparentControl |
Reparents a control added inside a tab. |
ResetTextControl |
Called by TabTextCtrl when it marks itself for deletion. |
SavePerspective |
Saves the entire user interface layout into an encoded string, which can then |
SetAGWWindowStyleFlag |
Sets the AGW-specific style of the window. |
SetArtProvider |
Sets the art provider to be used by the notebook. |
SetCloseButton |
Sets whether a tab should display a close button or not. |
SetFont |
Sets the tab font. |
SetImageList |
Sets the image list for the AuiNotebook control. |
SetMeasuringFont |
Sets the font for calculating text measurements. |
SetMinMaxTabWidth |
Sets the minimum and/or the maximum tab widths for AuiNotebook when the |
SetNavigatorIcon |
Sets the icon used by the TabNavigatorWindow . |
SetNormalFont |
Sets the normal font for drawing tab labels. |
SetPageBitmap |
Sets the tab bitmap for the page. |
SetPageImage |
Sets the image index for the given page. |
SetPageText |
Sets the tab label for the page. |
SetPageTextColour |
Sets the tab text colour for the page. |
SetPageTooltip |
Sets the tab tooltip for the page. |
SetRenamable |
Sets whether a tab can be renamed via a left double-click or not. |
SetSashDClickUnsplit |
Sets whether to unsplit a splitted AuiNotebook when double-clicking on a sash. |
SetSelectedFont |
Sets the selected tab font for drawing tab labels. |
SetSelection |
Sets the page selection. Calling this method will generate a page change event. |
SetSelectionToPage |
Sets the selection based on the input page. |
SetSelectionToWindow |
Sets the selection based on the input window win. |
SetTabCtrlHeight |
Sets the tab height. |
SetUniformBitmapSize |
Ensures that all tabs will have the same height, even if some tabs don’t have bitmaps. |
ShowWindowMenu |
Shows the window menu for the active tab control associated with this |
Split |
Performs a split operation programmatically. |
UnSplit |
Restores original view after a tab split. |
UnsplitDClick |
Unsplit the AuiNotebook on sash double-click. |
UpdateHintWindowSize |
Updates the AuiManager hint window size. |
UpdateTabCtrlHeight |
UpdateTabCtrlHeight does the actual tab resizing. It’s meant |
AuiNotebook
(wx.Panel)¶AuiNotebook is a notebook control which implements many features common in applications with dockable panes. Specifically, AuiNotebook 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.
An effort has been made to try to maintain an API as similar to that of Notebook
.
The default theme that is used is AuiDefaultTabArt
, which provides a modern, glossy
look and feel. The theme can be changed by calling AuiNotebook.SetArtProvider
.
__init__
(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, agwStyle=AUI_NB_DEFAULT_STYLE, name="AuiNotebook")¶Default class constructor.
Parameters: |
|
---|
AddControlToPage
(self, page_idx, control)¶Adds a control inside a tab (not in the tab area).
Parameters: |
---|
AddPage
(self, page, caption, select=False, bitmap=wx.NullBitmap, disabled_bitmap=wx.NullBitmap, control=None, tooltip="")¶Adds a page. If the select
parameter is True
, calling this will generate a
page change event.
Parameters: |
|
---|
AddTabAreaButton
(self, id, location, normal_bitmap=wx.NullBitmap, disabled_bitmap=wx.NullBitmap, name="")¶Adds a button in the tab area.
Parameters: |
|
---|
AdvanceSelection
(self, forward=True, wrap=True)¶Cycles through the tabs.
Parameters: |
|
---|
Note
The call to this function generates the page changing events.
AssignImageList
(self, imageList)¶Sets the image list for the AuiNotebook
control.
Parameters: | imageList – an instance of wx.ImageList . |
---|
CalculateNewSplitSize
(self)¶Calculates the size of the new split.
CalculateTabCtrlHeight
(self)¶Calculates the tab control area height.
CloneTabAreaButtons
(self)¶Clones the tab area buttons when the AuiNotebook
is being split.
See also
Note
Standard buttons for AuiNotebook
are not cloned, only custom ones.
DeletePage
(self, page_idx)¶Deletes a page at the given index. Calling this method will generate a page change event.
Parameters: | page_idx (integer) – the page index to be deleted. |
---|
Note
DeletePage
removes a tab from the multi-notebook, and destroys the window as well.
See also
Destroy
(self)¶Destroys the window safely.
Use this function instead of the del
operator, since different window
classes can be destroyed differently. Frames and dialogs are not destroyed
immediately when this function is called – they are added to a list of
windows to be deleted on idle time, when all the window’s events have been
processed. This prevents problems with events being sent to non-existent windows.
Returns: | True if the window has either been successfully deleted, or
it has been added to the list of windows pending real deletion. |
---|
Note
This method has been added to safely un-initialize the underlying
AuiManager
which manages the AuiNotebook
layout (i.e., tab split, re-ordering, tab floating etc...).
DoSizing
(self)¶Performs all sizing operations in each tab control.
EditTab
(self, page_index)¶Starts the editing of an item label, sending a EVT_AUINOTEBOOK_BEGIN_LABEL_EDIT
event.
Parameters: | page_index (integer) – the page index we want to edit. |
---|
EnableTab
(self, page_idx, enable=True)¶Enables/disables a page in the notebook.
Parameters: |
|
---|
EnsureVisible
(self, indx)¶Ensures the input page index indx is visible.
Parameters: | indx (integer) – the page index. |
---|
FindNextActiveTab
(self, ctrl_idx, ctrl)¶Finds the next active tab (used mainly when AuiNotebook
has inactive/disabled
tabs in it).
Parameters: |
|
---|
FindTab
(self, page)¶Finds the tab control that currently contains the window as well
as the index of the window in the tab control. It returns True
if the
window was found, otherwise False
.
Parameters: | page – an instance of AuiNotebookPage . |
---|
FloatPage
(self, page_index)¶Float the page in page_index by reparenting it to a floating frame.
Parameters: | page_index (integer) – the index of the page to be floated. |
---|
Warning
When the notebook is more or less full screen, tabs cannot be dragged far enough outside of the notebook to become floating pages.
GetActiveTabCtrl
(self)¶Returns the active tab control. It is called to determine which control gets new windows being added.
GetAGWWindowStyleFlag
(self)¶Returns the AGW-specific style of the window.
See also
SetAGWWindowStyleFlag
for a list of possible AGW-specific window styles.
GetArtProvider
(self)¶Returns the associated art provider.
GetAuiManager
(self)¶Returns the associated AuiManager
.
GetCurrentPage
(self)¶Returns the currently active page (not the index), or None
if none was selected.
GetDefaultBorder
(self)¶Returns the default border style for AuiNotebook
.
GetEnabled
(self, page_idx)¶Returns whether the page specified by the index page_idx is enabled.
Parameters: | page_idx (integer) – the page index. |
---|
GetHeightForPageHeight
(self, pageHeight)¶Gets the height of the notebook for a given page height.
Parameters: | pageHeight (integer) – the given page height. |
---|
GetImageList
(self)¶Returns the associated image list (if any).
GetMinMaxTabWidth
(self)¶Returns the minimum and the maximum tab widths for AuiNotebook
when the
AUI_NB_TAB_FIXED_WIDTH
style is defined.
Note
Minimum and maximum tabs widths are used only when the AUI_NB_TAB_FIXED_WIDTH
style is present.
See also
SetMinMaxTabWidth
for more information.
GetPage
(self, page_idx)¶Returns the page specified by the given index.
Parameters: | page_idx (integer) – the page index. |
---|
GetPageBitmap
(self, page_idx)¶Returns the tab bitmap for the page.
Parameters: | page_idx (integer) – the page index. |
---|
GetPageCount
(self)¶Returns the number of pages in the notebook.
GetPageImage
(self, page)¶Returns the image index for the given page.
Parameters: | page (integer) – the given page for which to retrieve the image index. |
---|
GetPageIndex
(self, page_wnd)¶Returns the page index for the specified window. If the window is not
found in the notebook, wx.NOT_FOUND
is returned.
Parameters: | page_wnd (wx.Window) – the window we are looking for. |
---|
GetPageInfo
(self, page_idx)¶Returns the AuiNotebookPage
info structure specified by the given index.
Parameters: | page_idx (integer) – the page index. |
---|
GetPageText
(self, page_idx)¶Returns the tab label for the page.
Parameters: | page_idx (integer) – the page index. |
---|
GetPageTextColour
(self, page_idx)¶Returns the tab text colour for the page.
Parameters: | page_idx (integer) – the page index. |
---|
GetPageTooltip
(self, page_idx)¶Returns the tab tooltip for the page.
Parameters: | page_idx (integer) – the page index. |
---|
GetSashDClickUnsplit
(self)¶Returns whether a splitted AuiNotebook
can be unsplitted by double-clicking
on the splitter sash.
GetSelection
(self)¶Returns the index of the currently active page, or -1 if none was selected.
GetTabContainer
(self)¶Returns the instance of AuiTabContainer
.
GetTabCtrlFromPoint
(self, pt)¶Returns the tab control at the specified point.
Parameters: | pt (wx.Point) – the mouse location. |
---|
GetTabCtrlHeight
(self)¶Returns the tab control height.
GetTabFrameFromTabCtrl
(self, tab_ctrl)¶Returns the tab frame associated with a tab control.
Parameters: | tab_ctrl – an instance of AuiTabCtrl . |
---|
GetTabFrameFromWindow
(self, wnd)¶Returns the tab frame associated with a window.
Parameters: | wnd (wx.Window) – the window for which we want to locate the TabFrame . |
---|
HasCloseButton
(self, page_idx)¶Returns whether a tab displays a close button or not.
Parameters: | page_idx (integer) – the page index. |
---|
Note
This can only be called if AUI_NB_CLOSE_ON_ALL_TABS
is specified.
HasMultiplePages
(self)¶This method should be overridden to return True
if this window has multiple pages. All
standard class with multiple pages such as Notebook
, Listbook
and Treebook
already override it to return True
and user-defined classes with similar behaviour
should do it as well to allow the library to handle such windows appropriately.
Note
Overridden from Panel
.
HideAllTabs
(self, hidden=True)¶Hides all tabs on the AuiNotebook
control.
Parameters: | hidden (bool) – if True hides all tabs. |
---|
InitNotebook
(self, agwStyle)¶Contains common initialization code called by all constructors.
Parameters: | agwStyle (integer) – the notebook style. |
---|
See also
__init__
for a list of available agwStyle bits.
InsertPage
(self, page_idx, page, caption, select=False, bitmap=wx.NullBitmap, disabled_bitmap=wx.NullBitmap, control=None, tooltip="")¶This is similar to AddPage
, but allows the ability to specify the insert location.
Parameters: |
|
---|
IsMouseWellOutsideWindow
(self)¶Returns whether the mouse is well outside the AuiNotebook
screen rectangle.
IsRenamable
(self, page_idx)¶Returns whether a tab can be renamed or not.
Parameters: | page_idx (integer) – the page index. |
---|---|
Returns: | True is a page can be renamed, False otherwise. |
LoadPerspective
(self, layout)¶Loads a layout which was saved with SavePerspective
.
Parameters: | layout (string) – a string which contains a saved AuiNotebook layout. |
---|
NotebookPreview
(self, thumbnail_size=200)¶Generates a preview of all the pages in the notebook (MSW and GTK only).
Parameters: | thumbnail_size (integer) – the maximum size of every page thumbnail (default=200 pixels). |
---|
Note
this functionality is currently unavailable on wxMAC.
OnChildFocusNotebook
(self, event)¶Handles the wx.EVT_CHILD_FOCUS
event for AuiNotebook
.
Parameters: | event – a ChildFocusEvent event to be processed. |
---|
OnCloseFloatingPage
(self, event)¶Handles the wx.EVT_CLOSE
event for a floating page in AuiNotebook
.
Parameters: | event – a CloseEvent event to be processed. |
---|
Handles the wx.EVT_NAVIGATION_KEY
event for AuiNotebook
.
Parameters: | event – a NavigationKeyEvent event to be processed. |
---|
OnRenameAccept
(self, page_index, value)¶Called by TabTextCtrl
, to accept the changes and to send the
EVT_AUINOTEBOOK_END_LABEL_EDIT
event.
Parameters: |
|
---|
OnRenameCancelled
(self, page_index)¶Called by TabTextCtrl
, to cancel the changes and to send the
EVT_AUINOTEBOOK_END_LABEL_EDIT
event.
Parameters: | page_index (integer) – the page index in the notebook. |
---|
OnSize
(self, event)¶Handles the wx.EVT_SIZE
event for AuiNotebook
.
Parameters: | event – a wx.SizeEvent event to be processed. |
---|
OnTabBeginDrag
(self, event)¶Handles the EVT_AUINOTEBOOK_BEGIN_DRAG
event for AuiNotebook
.
Parameters: | event – a AuiNotebookEvent event to be processed. |
---|
OnTabBgDClick
(self, event)¶Handles the EVT_AUINOTEBOOK_BG_DCLICK
event for AuiNotebook
.
Parameters: | event – a AuiNotebookEvent event to be processed. |
---|
OnTabButton
(self, event)¶Handles the EVT_AUINOTEBOOK_BUTTON
event for AuiNotebook
.
Parameters: | event – a AuiNotebookEvent event to be processed. |
---|
OnTabCancelDrag
(self, event)¶Handles the EVT_AUINOTEBOOK_CANCEL_DRAG
event for AuiNotebook
.
Parameters: | event – a AuiNotebookEvent event to be processed. |
---|
OnTabClicked
(self, event)¶Handles the EVT_AUINOTEBOOK_PAGE_CHANGING
event for AuiNotebook
.
Parameters: | event – a AuiNotebookEvent event to be processed. |
---|
OnTabDClick
(self, event)¶Handles the EVT_AUINOTEBOOK_TAB_DCLICK
event for AuiNotebook
.
Parameters: | event – a AuiNotebookEvent event to be processed. |
---|
OnTabDragMotion
(self, event)¶Handles the EVT_AUINOTEBOOK_DRAG_MOTION
event for AuiNotebook
.
Parameters: | event – a AuiNotebookEvent event to be processed. |
---|
OnTabEndDrag
(self, event)¶Handles the EVT_AUINOTEBOOK_END_DRAG
event for AuiNotebook
.
Parameters: | event – a AuiNotebookEvent event to be processed. |
---|
OnTabMiddleDown
(self, event)¶Handles the EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN
event for AuiNotebook
.
Parameters: | event – a AuiNotebookEvent event to be processed. |
---|
OnTabMiddleUp
(self, event)¶Handles the EVT_AUINOTEBOOK_TAB_MIDDLE_UP
event for AuiNotebook
.
Parameters: | event – a AuiNotebookEvent event to be processed. |
---|
OnTabRightDown
(self, event)¶Handles the EVT_AUINOTEBOOK_TAB_RIGHT_DOWN
event for AuiNotebook
.
Parameters: | event – a AuiNotebookEvent event to be processed. |
---|
OnTabRightUp
(self, event)¶Handles the EVT_AUINOTEBOOK_TAB_RIGHT_UP
event for AuiNotebook
.
Parameters: | event – a AuiNotebookEvent event to be processed. |
---|
ReDockPage
(self, pane)¶Re-docks a floating AuiNotebook
tab in the original position, when possible.
Parameters: | pane – an instance of AuiPaneInfo . |
---|
RemoveControlFromPage
(self, page_idx)¶Removes a control from a tab (not from the tab area).
Parameters: | page_idx (integer) – the page index. |
---|
RemoveEmptyTabFrames
(self)¶Removes all the empty tab frames.
RemovePage
(self, page_idx)¶Removes a page, without deleting the window pointer.
Parameters: | page_idx (integer) – the page index to be removed. |
---|
Note
RemovePage
removes a tab from the multi-notebook, but does not destroy the window.
See also
RemoveTabAreaButton
(self, id)¶Removes a button from the tab area.
Parameters: | id (integer) – the button identifier. |
---|
See also
AddTabAreaButton
for a list of button identifiers.
ReparentControl
(self, control, dest_tabs)¶Reparents a control added inside a tab.
Parameters: |
|
---|
ResetTextControl
(self)¶Called by TabTextCtrl
when it marks itself for deletion.
SavePerspective
(self)¶Saves the entire user interface layout into an encoded string, which can then
be stored by the application (probably using Config
). When a perspective
is restored using LoadPerspective
, the entire user interface will return
to the state it was when the perspective was saved.
SetAGWWindowStyleFlag
(self, agwStyle)¶Sets the AGW-specific style of the window.
Parameters: | agwStyle (integer) – the new window style. This can be a combination of the following bits:
|
---|
Note
Please note that some styles cannot be changed after the window
creation and that Refresh
might need to be be called after changing the
others for the change to take place immediately.
Todo
Implementation of flags AUI_NB_RIGHT
and AUI_NB_LEFT
.
SetArtProvider
(self, art)¶Sets the art provider to be used by the notebook.
Parameters: | art – an art provider. |
---|
SetCloseButton
(self, page_idx, hasCloseButton)¶Sets whether a tab should display a close button or not.
Parameters: |
|
---|
Note
This can only be called if AUI_NB_CLOSE_ON_ALL_TABS
is specified.
SetFont
(self, font)¶Sets the tab font.
Parameters: | font (wx.Font) – the new font to use to draw tab labels in their normal, un-selected state. |
---|
Note
Overridden from Panel
.
SetImageList
(self, imageList)¶Sets the image list for the AuiNotebook
control.
Parameters: | imageList (wx.ImageList) – the bitmap image list to associate to AuiNotebook . |
---|
SetMeasuringFont
(self, font)¶Sets the font for calculating text measurements.
Parameters: | font (wx.Font) – the new font to use to measure tab label text extents. |
---|
SetMinMaxTabWidth
(self, minTabWidth, maxTabWidth)¶Sets the minimum and/or the maximum tab widths for AuiNotebook
when the
AUI_NB_TAB_FIXED_WIDTH
style is defined.
Pass -1 to either minTabWidth or maxTabWidth to reset to the default tab
width behaviour for AuiNotebook
.
Parameters: |
|
---|
Note
Minimum and maximum tabs widths are used only when the AUI_NB_TAB_FIXED_WIDTH
style is present.
Sets the icon used by the TabNavigatorWindow
.
Parameters: | bmp (wx.Bitmap) – the new bitmap for the TabNavigatorWindow . |
---|
SetNormalFont
(self, font)¶Sets the normal font for drawing tab labels.
Parameters: | font (wx.Font) – the new font to use to draw tab labels in their normal, un-selected state. |
---|
SetPageBitmap
(self, page_idx, bitmap)¶Sets the tab bitmap for the page.
Parameters: |
|
---|
SetPageImage
(self, page, image)¶Sets the image index for the given page.
Parameters: |
|
---|
SetPageText
(self, page_idx, text)¶Sets the tab label for the page.
Parameters: |
|
---|
SetPageTextColour
(self, page_idx, colour)¶Sets the tab text colour for the page.
Parameters: |
|
---|
SetPageTooltip
(self, page_idx, tooltip)¶Sets the tab tooltip for the page.
Parameters: |
|
---|---|
Returns: |
|
SetRenamable
(self, page_idx, renamable)¶Sets whether a tab can be renamed via a left double-click or not.
Parameters: |
|
---|
SetSashDClickUnsplit
(self, unsplit=True)¶Sets whether to unsplit a splitted AuiNotebook
when double-clicking on a sash.
Parameters: | unsplit (bool) – True to unsplit on sash double-clicking, False otherwise. |
---|
SetSelectedFont
(self, font)¶Sets the selected tab font for drawing tab labels.
Parameters: | font (wx.Font) – the new font to use to draw tab labels in their selected state. |
---|
SetSelection
(self, new_page, force=False)¶Sets the page selection. Calling this method will generate a page change event.
Parameters: |
|
---|
SetSelectionToPage
(self, page)¶Sets the selection based on the input page.
Parameters: | page – an instance of AuiNotebookPage . |
---|
SetSelectionToWindow
(self, win)¶Sets the selection based on the input window win.
Parameters: | win – a wx.Window derived window. |
---|
SetTabCtrlHeight
(self, height)¶Sets the tab height.
By default, the tab control height is calculated by measuring the text height and bitmap sizes on the tab captions.
Calling this method will override that calculation and set the tab control
to the specified height parameter. A call to this method will override
any call to SetUniformBitmapSize
. Specifying -1 as the height will
return the control to its default auto-sizing behaviour.
Parameters: | height (integer) – the tab control area height. |
---|
SetUniformBitmapSize
(self, size)¶Ensures that all tabs will have the same height, even if some tabs don’t have bitmaps.
Passing wx.DefaultSize
to this method 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.
Parameters: | size (wx.Size) – the tab bitmap size. |
---|
ShowWindowMenu
(self)¶Shows the window menu for the active tab control associated with this
notebook, and returns True
if a selection was made.
Split
(self, page, direction)¶Performs a split operation programmatically.
Parameters: |
|
---|
UnSplit
(self)¶Restores original view after a tab split.
UnsplitDClick
(self, part, sash_size, pos)¶Unsplit the AuiNotebook
on sash double-click.
Parameters: |
|
---|
Warning
Due to a bug on MSW, for disabled pages FindWindowAtPoint
returns the wrong window. See http://trac.wxwidgets.org/ticket/2942
UpdateHintWindowSize
(self)¶Updates the AuiManager
hint window size.
UpdateTabCtrlHeight
(self, force=False)¶UpdateTabCtrlHeight
does the actual tab resizing. It’s meant
to be used interally.
Parameters: | force (bool) – True to force the tab art to repaint. |
---|