.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.aui.AuiNotebook:

==========================================================================================================================================
|phoenix_title|  **wx.aui.AuiNotebook**
==========================================================================================================================================

:ref:`wx.aui.AuiNotebook`  is part of the ``AUI`` class framework, which represents a notebook control, managing multiple windows with associated tabs. 
         

See also :ref:`AUI Overview <aui overview>`. 

:ref:`wx.aui.AuiNotebook`  is a notebook control which implements many features common in applications with dockable panes. Specifically, :ref:`wx.aui.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. 

The default theme since wxWidgets 3.3.0 is :ref:`wx.aui.AuiFlatTabArt`. If you would prefer to use the theme which used to be default in the previous versions, you can call :meth:`wx.aui.AuiNotebook.SetArtProvider`   with AuiNativeTabArt as the argument. Notice that AuiNativeTabArt may be not compatible with ``AUI_NB_BOTTOM``, ``AUI_NB_PIN_ON_ACTIVE_TAB``  and ``AUI_NB_UNPIN_ON_ALL_PINNED``  styles, so using it is not recommended if you use any of them. 



|phoenix_title| Multiple Tab Controls
=====================================

Initially, :ref:`wx.aui.AuiNotebook`  creates the main tab control, which can be retrieved using :meth:`~wx.aui.AuiNotebook.GetMainTabCtrl`, and uses it for all tabs. However when ``AUI_NB_TAB_SPLIT``  style is used (which is the case by default), the user will be able to drag pages out of it and create new tab controls, that can then themselves be dragged to be docked in a different place inside the notebook. Also, whether ``AUI_NB_TAB_SPLIT``  is specified or not, :meth:`~wx.aui.AuiNotebook.Split`  function can always be used to create new tab controls programmatically. When using multiple tab controls, exactly one of them is active at any time. This tab control can be retrieved by calling :meth:`~wx.aui.AuiNotebook.GetActiveTabCtrl`  and is always used for appending or inserting new pages. You can also use :meth:`~wx.aui.AuiNotebook.GetAllTabCtrls`  to get all existing tab controls.  



|phoenix_title| Pages Indices and Positions
===========================================

Each notebook page has its logical index, which is determined by the order in which the pages are added, i.e. the first page added has index 0, the second one has index 1, and so on, but also has its physical display position, which corresponds to the position at which it is displayed. Initially the indices and positions are the same for all pages, but they may become different if the user reorders the pages by dragging them around (which is possible when ``AUI_NB_TAB_MOVE``  style, included in the default notebook flags, is on). Also note that it's possible to have multiple pages with the same physical position, in different tab controls (see the previous section), e.g. each first page in each tab control has physical position 0, but there is only one page with logical index 0. All functions taking a page index parameter, such as :meth:`~wx.aui.AuiNotebook.SetPageText`, work with logical indices. Similarly, functions returning a page index, such as :meth:`~wx.aui.AuiNotebook.GetSelection`, also always return logical indices. To get the physical position of a single page, use :meth:`~wx.aui.AuiNotebook.GetPagePosition`  and to get all pages in some tab control in their physical, display order :meth:`~wx.aui.AuiNotebook.GetPagesInDisplayOrder`  can be used.  



|phoenix_title| Pages Layout
============================



.. _AuiNotebook-styles:

|styles| Window Styles
================================

When the user can change the notebook layout interactively, i.e. when ``AUI_NB_TAB_MOVE``  and/or ``AUI_NB_TAB_SPLIT``  styles are used, it can be useful to remember the current layout on program exit and restore it when it is restarted. This can be done by saving, and reloading, the layout of the entire :ref:`wx.aui.AuiManager`  containing this notebook using :meth:`wx.aui.AuiManager.SaveLayout`   and :meth:`wx.aui.AuiManager.LoadLayout` , but it can also be done just for the given notebook, without affecting the other panes, using :meth:`~wx.aui.AuiNotebook.SaveLayout`  and :meth:`~wx.aui.AuiNotebook.LoadLayout`  functions of this class. Using them is similar to using :ref:`wx.aui.AuiManager`  functions, except they only require implementing :ref:`wx.aui.AuiBookSerializer`  or :ref:`wx.aui.AuiBookDeserializer`  interface, which is a subset of the full :ref:`wx.aui.AuiSerializer`  or :ref:`wx.aui.AuiDeserializer`. The :ref:`Advanced User Interface Sample <advanced user interface sample>`  shows how to use them. This class supports the following styles:   

- ``wx.aui.AUI_NB_DEFAULT_STYLE``: Defined as ``wx.aui.AUI_NB_TOP`` | ``wx.aui.AUI_NB_TAB_SPLIT`` | ``wx.aui.AUI_NB_TAB_MOVE`` | ``wx.aui.AUI_NB_SCROLL_BUTTONS`` | ``wx.aui.AUI_NB_CLOSE_ON_ACTIVE_TAB`` | ``wx.aui.AUI_NB_MIDDLE_CLICK_CLOSE``.  
- ``wx.aui.AUI_NB_TAB_SPLIT``: Allows the tab control to be split by dragging a tab.  
- ``wx.aui.AUI_NB_TAB_MOVE``: Allows a tab to be moved horizontally by dragging.  
- ``wx.aui.AUI_NB_TAB_EXTERNAL_MOVE``: Allows a tab to be moved to another tab control.  
- ``wx.aui.AUI_NB_TAB_FIXED_WIDTH``: With this style, all tabs have the same width.  
- ``wx.aui.AUI_NB_SCROLL_BUTTONS``: With this style, left and right scroll buttons are displayed. Note that this style is ignored if ``wx.aui.AUI_NB_MULTILINE`` is used.  
- ``wx.aui.AUI_NB_WINDOWLIST_BUTTON``: With this style, a drop-down list of windows is available.  
- ``wx.aui.AUI_NB_CLOSE_BUTTON``: With this style, a close button is available on the tab bar.  
- ``wx.aui.AUI_NB_CLOSE_ON_ACTIVE_TAB``: With this style, the close button is visible on the active tab.  
- ``wx.aui.AUI_NB_CLOSE_ON_ALL_TABS``: With this style, the close button is visible on all tabs.  
- ``wx.aui.AUI_NB_MIDDLE_CLICK_CLOSE``: With this style, middle click on a tab closes the tab.  
- ``wx.aui.AUI_NB_TOP``: With this style, tabs are drawn along the top of the notebook.  
- ``wx.aui.AUI_NB_BOTTOM``: With this style, tabs are drawn along the bottom of the notebook.  
- ``wx.aui.AUI_NB_MULTILINE``: If this style is specified and all the tabs don't fit in the visible area, multiple rows of tabs are used instead of adding a button allowing to scroll them. This style is only available in wxWidgets 3.3.0 or later.  
- ``wx.aui.AUI_NB_PIN_ON_ACTIVE_TAB``: If this style is specified, the active tab shows either a "pin" icon allowing to pin it (i.e. change its kind to :meth:`wx.aui.AuiTabKind.Pinned` ) if it's not currently pinned or an "unpin" icon to change the kind back to normal. This style is not included in the default notebook style and has to be explicitly specified for the user to be able to pin the tabs interactively. It is available in wxWidgets 3.3.0 or later.  
- ``wx.aui.AUI_NB_UNPIN_ON_ALL_PINNED``: If this style is specified, "unpin" button is shown on all currently pinned tabs, allowing the user to unpin them, i.e. make them normal again. This style can be combined with ``AUI_NB_PIN_ON_ACTIVE_TAB``  or used on its own. It is available in wxWidgets 3.3.0 or later.  






.. _AuiNotebook-events:

|events| Events Emitted by this Class
=====================================

Handlers bound for the following event types will receive one of the :ref:`wx.aui.AuiNotebookEvent` parameters.

- EVT_AUINOTEBOOK_PAGE_CLOSE: A page is about to be closed. Processes a  ``wxEVT_AUINOTEBOOK_PAGE_CLOSE``   event.   
- EVT_AUINOTEBOOK_PAGE_CLOSED(winid,  fn): A page has been closed. Processes a  ``wxEVT_AUINOTEBOOK_PAGE_CLOSED``   event.   
- EVT_AUINOTEBOOK_PAGE_CHANGED: The page selection was changed. Processes a  ``wxEVT_AUINOTEBOOK_PAGE_CHANGED``   event.   
- EVT_AUINOTEBOOK_PAGE_CHANGING: The page selection is about to be changed. Processes a  ``wxEVT_AUINOTEBOOK_PAGE_CHANGING``   event. This event can be vetoed.   
- EVT_AUINOTEBOOK_BUTTON: The window list button has been pressed. Processes a  ``wxEVT_AUINOTEBOOK_BUTTON``   event.   
- EVT_AUINOTEBOOK_BEGIN_DRAG: Dragging is about to begin. Processes a  ``wxEVT_AUINOTEBOOK_BEGIN_DRAG``   event.   
- EVT_AUINOTEBOOK_END_DRAG: Dragging has ended. Processes a  ``wxEVT_AUINOTEBOOK_END_DRAG``   event.   
- EVT_AUINOTEBOOK_DRAG_MOTION: Emitted during a drag and drop operation. Processes a  ``wxEVT_AUINOTEBOOK_DRAG_MOTION``   event.   
- EVT_AUINOTEBOOK_ALLOW_DND: Whether to allow a tab to be dropped. Processes a  ``wxEVT_AUINOTEBOOK_ALLOW_DND``   event. This event must be specially allowed.   
- EVT_AUINOTEBOOK_DRAG_DONE(winid,  fn): Notify that the tab has been dragged. Processes a  ``wxEVT_AUINOTEBOOK_DRAG_DONE``   event.   
- EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid,  fn): The middle mouse button is pressed on a tab. Processes a  ``wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN``   event.   
- EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid,  fn): The middle mouse button is released on a tab. Processes a  ``wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP``   event.   
- EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid,  fn): The right mouse button is pressed on a tab. Processes a  ``wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN``   event.   
- EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid,  fn): The right mouse button is released on a tab. Processes a  ``wxEVT_AUINOTEBOOK_TAB_RIGHT_UP``   event.   
- EVT_AUINOTEBOOK_BG_DCLICK(winid,  fn): Double clicked on the tabs background area. Processes a  ``wxEVT_AUINOTEBOOK_BG_DCLICK``   event.   

Please see the note in
:ref:`wx.aui.AuiNotebookEvent`  documentation about handling these events.   




|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>AuiNotebook</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.aui.AuiNotebook_inheritance.svg" alt="Inheritance diagram of AuiNotebook" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.aui.AuiNotebook.html" title="wx.aui.AuiNotebook  is part of the ``AUI`` class framework, which represents a notebook control, managing multiple windows with associated tabs." alt="" coords="108,389,279,418"/> <area shape="rect" id="node2" href="wx.BookCtrlBase.html" title="A book control is a convenient way of displaying multiple pages of information, displayed one page at a time." alt="" coords="118,313,269,341"/> <area shape="rect" id="node3" href="wx.Control.html" title="This is the base class for a control or 'widget'." alt="" coords="69,236,174,265"/> <area shape="rect" id="node4" href="wx.WithImages.html" title="A mixin class to be used with other classes that use a wx.ImageList." alt="" coords="198,236,335,265"/> <area shape="rect" id="node5" href="wx.Window.html" title="wx.Window  is the base class for all windows and represents any visible object on screen." alt="" coords="66,159,177,188"/> <area shape="rect" id="node6" href="wx.EvtHandler.html" title="A class that can handle events from the windowing system." alt="" coords="55,82,188,111"/> <area shape="rect" id="node7" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="5,5,104,34"/> <area shape="rect" id="node8" href="wx.Trackable.html" title="Add-on base class for a trackable object." alt="" coords="128,5,251,34"/> </map> 
   </p>
   </div>

|


|sub_classes| Known Subclasses
==============================

:ref:`wx.aui.AuiMDIClientWindow`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.aui.AuiNotebook.__init__`                                             Default constructor.
:meth:`~wx.aui.AuiNotebook.AddPage`                                              Adds a page.
:meth:`~wx.aui.AuiNotebook.AdvanceSelection`                                     Sets the selection to the next or previous page in the same tab control.
:meth:`~wx.aui.AuiNotebook.ChangeSelection`                                      Changes the selection for the given page, returning the previous selection.
:meth:`~wx.aui.AuiNotebook.Create`                                               Creates the notebook window.
:meth:`~wx.aui.AuiNotebook.DeleteAllPages`                                       Deletes all pages.
:meth:`~wx.aui.AuiNotebook.DeletePage`                                           Deletes a page at the given index.
:meth:`~wx.aui.AuiNotebook.FindTab`                                              Finds tab control associated with a given window and its tab index.
:meth:`~wx.aui.AuiNotebook.GetActiveTabCtrl`                                     Returns active tab control for this notebook.
:meth:`~wx.aui.AuiNotebook.GetArtProvider`                                       Returns the associated art provider.
:meth:`~wx.aui.AuiNotebook.GetClassDefaultAttributes`                            
:meth:`~wx.aui.AuiNotebook.GetCurrentPage`                                       Returns the currently selected page or nullptr.
:meth:`~wx.aui.AuiNotebook.GetHeightForPageHeight`                               Returns the desired height of the notebook for the given page height.
:meth:`~wx.aui.AuiNotebook.GetMainTabCtrl`                                       Returns the main tab control for this notebook.
:meth:`~wx.aui.AuiNotebook.GetPage`                                              Returns the page specified by the given index.
:meth:`~wx.aui.AuiNotebook.GetPageBitmap`                                        Returns the tab bitmap for the page.
:meth:`~wx.aui.AuiNotebook.GetPageCount`                                         Returns the number of pages in the notebook.
:meth:`~wx.aui.AuiNotebook.GetPageImage`                                         Returns the image index for the given page.
:meth:`~wx.aui.AuiNotebook.GetPageIndex`                                         Returns the page index for the specified window.
:meth:`~wx.aui.AuiNotebook.GetPageKind`                                          Returns the tab kind for the page.
:meth:`~wx.aui.AuiNotebook.GetPagePosition`                                      Returns the position of the page in the notebook.
:meth:`~wx.aui.AuiNotebook.GetPageText`                                          Returns the tab label for the page.
:meth:`~wx.aui.AuiNotebook.GetPageToolTip`                                       Returns the tooltip for the tab label of the page.
:meth:`~wx.aui.AuiNotebook.GetSelection`                                         Returns the currently selected page.
:meth:`~wx.aui.AuiNotebook.GetTabCtrlFromPoint`                                  Returns tab control based on point coordinates inside the tab frame.
:meth:`~wx.aui.AuiNotebook.GetTabCtrlHeight`                                     Returns the height of the tab control.
:meth:`~wx.aui.AuiNotebook.InsertPage`                                           :meth:`~AuiNotebook.InsertPage`   is similar to AddPage, but allows the ability to specify the insert location.
:meth:`~wx.aui.AuiNotebook.LoadLayout`                                           Load the previously saved layout of the notebook.
:meth:`~wx.aui.AuiNotebook.RemovePage`                                           Removes a page, without deleting the window pointer.
:meth:`~wx.aui.AuiNotebook.SaveLayout`                                           Save the layout of the notebook using the provided serializer.
:meth:`~wx.aui.AuiNotebook.SetArtProvider`                                       Sets the art provider to be used by the notebook.
:meth:`~wx.aui.AuiNotebook.SetFont`                                              Sets the font for drawing the tab labels, using a bold version of the font for selected tab labels.
:meth:`~wx.aui.AuiNotebook.SetManagerFlags`                                      Sets the flags for the :ref:`wx.aui.AuiManager`  used by :ref:`wx.aui.AuiNotebook`.
:meth:`~wx.aui.AuiNotebook.SetMeasuringFont`                                     Sets the font for measuring tab labels.
:meth:`~wx.aui.AuiNotebook.SetNormalFont`                                        Sets the font for drawing unselected tab labels.
:meth:`~wx.aui.AuiNotebook.SetPageBitmap`                                        Sets the bitmap for the page.
:meth:`~wx.aui.AuiNotebook.SetPageImage`                                         Sets the image index for the given page.
:meth:`~wx.aui.AuiNotebook.SetPageKind`                                          Set the tab kind.
:meth:`~wx.aui.AuiNotebook.SetPageText`                                          Sets the tab label for the page.
:meth:`~wx.aui.AuiNotebook.SetPageToolTip`                                       Sets the tooltip displayed when hovering over the tab label of the page.
:meth:`~wx.aui.AuiNotebook.SetSelectedFont`                                      Sets the font for drawing selected tab labels.
:meth:`~wx.aui.AuiNotebook.SetSelection`                                         Sets the page selection.
:meth:`~wx.aui.AuiNotebook.SetTabCtrlHeight`                                     Sets the tab height.
:meth:`~wx.aui.AuiNotebook.SetUniformBitmapSize`                                 Ensure that all tabs have the same height, even if some of them don't have bitmaps.
:meth:`~wx.aui.AuiNotebook.ShowWindowMenu`                                       Shows the window menu for the active tab control associated with this notebook, and returns ``True`` if a selection was made.
:meth:`~wx.aui.AuiNotebook.Split`                                                Split performs a split operation programmatically.
:meth:`~wx.aui.AuiNotebook.UnsplitAll`                                           Remove all split tab controls, leaving only the single one.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.aui.AuiNotebook.ActiveTabCtrl`                                        See :meth:`~wx.aui.AuiNotebook.GetActiveTabCtrl`
:attr:`~wx.aui.AuiNotebook.ArtProvider`                                          See :meth:`~wx.aui.AuiNotebook.GetArtProvider` and :meth:`~wx.aui.AuiNotebook.SetArtProvider`
:attr:`~wx.aui.AuiNotebook.CurrentPage`                                          See :meth:`~wx.aui.AuiNotebook.GetCurrentPage`
:attr:`~wx.aui.AuiNotebook.MainTabCtrl`                                          See :meth:`~wx.aui.AuiNotebook.GetMainTabCtrl`
:attr:`~wx.aui.AuiNotebook.PageCount`                                            See :meth:`~wx.aui.AuiNotebook.GetPageCount`
:attr:`~wx.aui.AuiNotebook.Selection`                                            See :meth:`~wx.aui.AuiNotebook.GetSelection` and :meth:`~wx.aui.AuiNotebook.SetSelection`
:attr:`~wx.aui.AuiNotebook.TabCtrlHeight`                                        See :meth:`~wx.aui.AuiNotebook.GetTabCtrlHeight` and :meth:`~wx.aui.AuiNotebook.SetTabCtrlHeight`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.aui.AuiNotebook(BookCtrlBase)

   **Possible constructors**::

       AuiNotebook() -> None
       
       AuiNotebook(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize,
                   style=AUI_NB_DEFAULT_STYLE) -> None
       
   
   AuiNotebook is part of the ``AUI`` class framework, which represents a
   notebook control, managing multiple windows with associated tabs.



   .. method:: __init__(self, *args, **kw)



      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self)`
      
      Default constructor. 
                       
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=AUI_NB_DEFAULT_STYLE)`
      
      Constructor. 
                       
      
      Creates a AuiNotebok control. 
                       
      
      
      :param `parent`: 
      :type `parent`: wx.Window
      :param `id`: 
      :type `id`: wx.WindowID
      :param `pos`: 
      :type `pos`: wx.Point
      :param `size`: 
      :type `size`: wx.Size
      :param `style`: 
      :type `style`: long
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: AddPage(self, *args, **kw)



      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **AddPage** `(self, page, caption, select=False, bitmap=BitmapBundle())`
      
      Adds a page. 
                       
      
      If the `select`  parameter is ``True``, calling this will generate a page change event. 
                       
      
      
      :param `page`: 
      :type `page`: wx.Window
      :param `caption`: 
      :type `caption`: string
      :param `select`: 
      :type `select`: bool
      :param `bitmap`: 
      :type `bitmap`: wx.BitmapBundle
      
      
      
      
      :rtype: `bool`
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **AddPage** `(self, page, text, select, imageId)`
      
      Adds a new page. 
                       
      
      The page must have the book control itself as the parent and must not have been added to this control previously. 
      
      The call to this function may generate the page changing events. 
      
      
      
      
      :param `page`: Specifies the new page.   
      :type `page`: wx.Window
      :param `text`: Specifies the text for the new page.   
      :type `text`: string
      :param `select`: Specifies whether the page should be selected.   
      :type `select`: bool
      :param `imageId`: Specifies the optional image index for the new page.  
      :type `imageId`: int
      
      
      
      
      
      
      
      
      
      
      
      
      :rtype: `bool`
      
      
      
      
                        
      
      
      
      :returns: 
      
         ``True`` if successful, ``False`` otherwise.  
      
      
      
      
      
      
      
      .. versionadded:: 2.9.3 
           
      
      
      
      
      
      
      
      .. note:: 
      
         Do not delete the page, it will be deleted by the book control.  
      
      
      
      
      
      
      
      .. seealso:: :meth:`InsertPage`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: AdvanceSelection(self, forward=True)

      Sets the selection to the next or previous page in the same tab control. 
                 

      This function sets selection to the next (if `forward`  is ``True``) or previous (otherwise) page after or before the currently selected one in but without leaving the current tab control. 
                 


      :param `forward`: 
      :type `forward`: bool




      :rtype: `None`     








   .. method:: ChangeSelection(self, n)

      Changes the selection for the given page, returning the previous selection. 
                 

      This function behaves as :meth:`SetSelection`   but does `not`  generate the page changing events. 

      See :ref:`User Generated Events vs Programmatically Generated Events <user generated events vs programmatically generated events>`  for more information. 
                 


      :param `n`: 
      :type `n`: int




      :rtype: `int`







      .. versionadded:: 2.9.3 
     








   .. method:: Create(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0)

      Creates the notebook window. 
                 


      :param `parent`: 
      :type `parent`: wx.Window
      :param `id`: 
      :type `id`: wx.WindowID
      :param `pos`: 
      :type `pos`: wx.Point
      :param `size`: 
      :type `size`: wx.Size
      :param `style`: 
      :type `style`: long




      :rtype: `bool`








   .. method:: DeleteAllPages(self)

      Deletes all pages. 
                 


                

      :rtype: `bool`







      .. versionadded:: 2.9.3 
     








   .. method:: DeletePage(self, page)

      Deletes a page at the given index. 
                 

      Calling this method will generate a page change event. 
                 


      :param `page`: 
      :type `page`: int




      :rtype: `bool`








   .. method:: FindTab(self, page, ctrl, idx)

      Finds tab control associated with a given window and its tab index. 
                 


                


      :param `page`: 
      :type `page`: wx.Window
      :param `ctrl`: 
      :type `ctrl`: AuiTabCtrl
      :param `idx`: 
      :type `idx`: int




      :rtype: `bool`







      :returns: 

         ``True`` when the tab control is found, ``False`` otherwise.  







      .. versionadded:: 4.1/wxWidgets-3.1.4  
     








   .. method:: GetActiveTabCtrl(self)

      Returns active tab control for this notebook. 
                 

      Active tab control is the one containing the currently selected page. If there is no selected page, the main tab control is returned, see :meth:`GetMainTabCtrl` . 


                

      :rtype: :ref:`wx.aui.AuiTabCtrl`







      :returns: 

         Non-nullptr pointer to either the active or main tab control.  







      .. versionadded:: 4.1/wxWidgets-3.1.4  
     








   .. method:: GetArtProvider(self)

      Returns the associated art provider. 
                 

      :rtype: :ref:`wx.aui.AuiTabArt`








   .. staticmethod:: GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)




      :param `variant`: 
      :type `variant`: wx.WindowVariant




      :rtype: `VisualAttributes`     








   .. method:: GetCurrentPage(self)

      Returns the currently selected page or nullptr. 
                 


                

      :rtype: `Window`     







      .. versionadded:: 2.9.3 
     








   .. method:: GetHeightForPageHeight(self, pageHeight)

      Returns the desired height of the notebook for the given page height. 
                 

      Use this to fit the notebook to a given page size. 
                 


      :param `pageHeight`: 
      :type `pageHeight`: int




      :rtype: `int`








   .. method:: GetMainTabCtrl(self)

      Returns the main tab control for this notebook. 
                 

      The main tab control is the one created by the notebook itself initially to contain the pages added to it. 


                

      :rtype: :ref:`wx.aui.AuiTabCtrl`







      :returns: 

         Non-nullptr pointer to the main tab control.  







      .. versionadded:: 4.3/wxWidgets-3.3.0  
     








   .. method:: GetPage(self, page_idx)

      Returns the page specified by the given index. 
                 


      :param `page_idx`: 
      :type `page_idx`: int




      :rtype: `Window`     








   .. method:: GetPageBitmap(self, page)

      Returns the tab bitmap for the page. 
                 


      :param `page`: 
      :type `page`: int




      :rtype: `Bitmap`     








   .. method:: GetPageCount(self)

      Returns the number of pages in the notebook. 
                 

      :rtype: `int`








   .. method:: GetPageImage(self, nPage)

      Returns the image index for the given page. 
                 


      :param `nPage`: 
      :type `nPage`: int




      :rtype: `int`








   .. method:: 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. 

      This is AUI-specific equivalent to `BookCtrl.FindPage()` and it is recommended to use that generic method instead of this one. 
                 


      :param `page_wnd`: 
      :type `page_wnd`: wx.Window




      :rtype: `int`








   .. method:: GetPageKind(self, pageIdx)

      Returns the tab kind for the page. 
                 

      See :meth:`SetPageKind` . 


                


      :param `pageIdx`: 
      :type `pageIdx`: int




      :rtype: :ref:`wx.aui.AuiTabKind`







      .. versionadded:: 4.3/wxWidgets-3.3.0  
     








   .. method:: GetPagePosition(self, page)

      Returns the position of the page in the notebook. 
                 

      For example, to determine if one page is located immediately next to another one, the following code could be used: 



      Note that it would be wrong to just check that  ``page1 + 1 == page2``   here because the logical page index may not correspond to their visual position if they have been reordered by the user in a control with ``wx.aui.AUI_NB_TAB_MOVE`` style. 


                


      :param `page`: 
      :type `page`: int




      :rtype: :ref:`wx.aui.AuiNotebookPosition`







      .. versionadded:: 4.3/wxWidgets-3.3.0  
     








   .. method:: GetPageText(self, page)

      Returns the tab label for the page. 
                 


      :param `page`: 
      :type `page`: int




      :rtype: `str`








   .. method:: GetPageToolTip(self, pageIdx)

      Returns the tooltip for the tab label of the page. 
                 


                


      :param `pageIdx`: 
      :type `pageIdx`: int




      :rtype: `str`







      .. versionadded:: 2.9.4 
     








   .. method:: GetSelection(self)

      Returns the currently selected page. 
                 

      :rtype: `int`








   .. method:: GetTabCtrlFromPoint(self, pt)

      Returns tab control based on point coordinates inside the tab frame. 
                 


                


      :param `pt`: 
      :type `pt`: wx.Point




      :rtype: :ref:`wx.aui.AuiTabCtrl`







      .. versionadded:: 4.1/wxWidgets-3.1.4  
     








   .. method:: GetTabCtrlHeight(self)

      Returns the height of the tab control. 
                 

      :rtype: `int`








   .. method:: InsertPage(self, *args, **kw)



      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **InsertPage** `(self, index, page, text, select=False, bitmap=BitmapBundle())`
      
      :meth:`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. 
      
      Page index `page_idx`  specifies the page before which the new page should be inserted. It may be equal to the current number of pages in the notebook, in which case this function is equivalent to :meth:`AddPage` , but can't be strictly greater than it. 
      
      Note that if you want to insert the page at the specified physical position, e.g. at the beginning of the current tab control, you need to use :meth:`GetPagesInDisplayOrder`   to get the logical page index corresponding to the position 0 and then pass this index to this function. 
      
      Note that if the page with the given index is not in the currently active tab control, the new page will be added at the end of the active tab instead of being inserted into another tab control. 
      
      
      
      
      :param `index`: Specifies the page before which the new page should be inserted.   
      :type `index`: int
      :param `page`: Specifies the new page.   
      :type `page`: wx.Window
      :param `text`: Specifies the text for the new page.   
      :type `text`: string
      :param `select`: Specifies whether the page should be selected.   
      :type `select`: bool
      :param `bitmap`: Specifies the optional bitmap to use for the new page.  
      :type `bitmap`: wx.BitmapBundle
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      :rtype: `bool`
      
      
      
      
                        
      
      
      
      :returns: 
      
         ``True`` if successful, ``False`` otherwise.  
      
      
      
      
      
      
      
      .. versionadded:: 2.9.3 
           
      
      
      
      
      
      
      
      .. note:: 
      
         Do not delete the page, it will be deleted by the book control.  
      
      
      
      
      
      
      
      .. seealso:: :meth:`AddPage`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **InsertPage** `(self, index, page, text, select, imageId)`
      
      This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
                       
      
      
      :param `index`: 
      :type `index`: int
      :param `page`: 
      :type `page`: wx.Window
      :param `text`: 
      :type `text`: string
      :param `select`: 
      :type `select`: bool
      :param `imageId`: 
      :type `imageId`: int
      
      
      
      
      :rtype: `bool`
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: LoadLayout(self, name, deserializer)

      Load the previously saved layout of the notebook. 
                 

      This function is used to restore the layout previously saved by :meth:`SaveLayout` . 




      :param `name`: Used as argument for :meth:`wx.aui.AuiBookDeserializer.LoadNotebookTabs`   call.   
      :type `name`: string
      :param `deserializer`: The object to use for restoring the layout.  
      :type `deserializer`: wx.aui.AuiBookDeserializer








      :rtype: `None`     




                  



      .. versionadded:: 4.3/wxWidgets-3.3.0  
     







      .. seealso:: :meth:`wx.aui.AuiManager.LoadLayout`   








   .. method:: RemovePage(self, page)

      Removes a page, without deleting the window pointer. 
                 


      :param `page`: 
      :type `page`: int




      :rtype: `bool`








   .. method:: SaveLayout(self, name, serializer)

      Save the layout of the notebook using the provided serializer. 
                 

      The notebook layout includes the number and positions of all the tab controls as well as the pages contained in each of them and their order. 

      The serializer defines how exactly this information is saved: it can use any form of serialization, e.g. ``XML`` or ``JSON``, to do it, with the only requirement being that :meth:`LoadLayout`   should be able to restore it from the same `name`. 




      :param `name`: Used as argument for :meth:`wx.aui.AuiBookSerializer.BeforeSaveNotebook`   call.   
      :type `name`: string
      :param `serializer`: The object to use for saving the layout.  
      :type `serializer`: wx.aui.AuiBookSerializer








      :rtype: `None`     




                  



      .. versionadded:: 4.3/wxWidgets-3.3.0  
     







      .. seealso:: :meth:`wx.aui.AuiManager.SaveLayout`   








   .. method:: SetArtProvider(self, art)

      Sets the art provider to be used by the notebook. 
                 


      :param `art`: 
      :type `art`: wx.aui.AuiTabArt




      :rtype: `None`     








   .. method:: SetFont(self, font)

      Sets the font for drawing the tab labels, using a bold version of the font for selected tab labels. 
                 


      :param `font`: 
      :type `font`: wx.Font




      :rtype: `bool`








   .. method:: SetManagerFlags(self, flags)

      Sets the flags for the :ref:`wx.aui.AuiManager`  used by :ref:`wx.aui.AuiNotebook`. 
                 

      Please note that it makes sense to use only some of :ref:`wx.aui.AuiManager`  flags, documented in AuiManagerOption, with :ref:`wx.aui.AuiNotebook`, but the other ones are simply ignored, so it is always possible to reuse the same flags for the main :ref:`wx.aui.AuiManager`  and the one used by the notebook. 

      Example of using this function to enable the Venetian blinds effect for the notebook:  


                


      :param `flags`: 
      :type `flags`: int




      :rtype: `None`     







      .. versionadded:: 4.3/wxWidgets-3.3.0  
     







      .. seealso:: :meth:`wx.aui.AuiManager.SetFlags` , :ref:`wx.aui.AuiManagerOption`  








   .. method:: SetMeasuringFont(self, font)

      Sets the font for measuring tab labels. 
                 


      :param `font`: 
      :type `font`: wx.Font




      :rtype: `None`     








   .. method:: SetNormalFont(self, font)

      Sets the font for drawing unselected tab labels. 
                 


      :param `font`: 
      :type `font`: wx.Font




      :rtype: `None`     








   .. method:: SetPageBitmap(self, page, bitmap)

      Sets the bitmap for the page. 
                 

      To remove a bitmap from the tab caption, pass an empty :ref:`wx.BitmapBundle`. 
                 


      :param `page`: 
      :type `page`: int
      :param `bitmap`: 
      :type `bitmap`: wx.BitmapBundle




      :rtype: `bool`








   .. method:: SetPageImage(self, n, imageId)

      Sets the image index for the given page. 
                 

      `image`  is an index into the image list which was set with :meth:`SetImageList` . 
                 


      :param `n`: 
      :type `n`: int
      :param `imageId`: 
      :type `imageId`: int




      :rtype: `bool`







      .. versionadded:: 2.9.3 
     








   .. method:: SetPageKind(self, pageIdx, kind)

      Set the tab kind. 
                 

      Can be used to pin or lock a tab. 

      Tabs are are grouped in 3 subsets (each of which can possibly be empty): 



      - Shown first are locked tabs which are typically used for showing some different content from the normal (and pinned) tabs. These tabs are special, they're always shown and can't be closed nor moved, by dragging them, by the user. 
      - Next are pinned tabs: these tabs can be closed and, depending on whether ``AUI_NB_PIN_ON_ACTIVE_TAB``  and ``AUI_NB_UNPIN_ON_ALL_PINNED``  styles are specified, can also be unpinned (i.e. made normal) by the user. If ``AUI_NB_TAB_MOVE``  is specified, they can be moved by dragging them, however they are restricted to remain in the pinned tabs group, i.e. only the order of the pinned tabs can be changed. 
      - Finally, normal tabs are shown. These tabs can be closed and, depending on ``AUI_NB_PIN_ON_ACTIVE_TAB``  style, pinned by the user. They can also be moved by dragging them, but only inside the same group. 







      :param `pageIdx`: The index of the page to change.   
      :type `pageIdx`: int
      :param `kind`: The new kind for the page.   
      :type `kind`: wx.aui.AuiTabKind








      :rtype: `bool`




                  



      :returns: 

         ``True`` if the kind was changed, ``False`` if it didn't change, either because the page already was of the specified `kind`  or because the preconditions were not satisfied, e.g. the page index was invalid.  







      .. versionadded:: 4.3/wxWidgets-3.3.0  
     








   .. method:: SetPageText(self, page, text)

      Sets the tab label for the page. 
                 


      :param `page`: 
      :type `page`: int
      :param `text`: 
      :type `text`: string




      :rtype: `bool`








   .. method:: SetPageToolTip(self, page, text)

      Sets the tooltip displayed when hovering over the tab label of the page. 
                 


                


      :param `page`: 
      :type `page`: int
      :param `text`: 
      :type `text`: string




      :rtype: `bool`







      :returns: 

         ``True`` if tooltip was updated, ``False`` if it failed, e.g. because the page index is invalid.  







      .. versionadded:: 2.9.4 
     








   .. method:: SetSelectedFont(self, font)

      Sets the font for drawing selected tab labels. 
                 


      :param `font`: 
      :type `font`: wx.Font




      :rtype: `None`     








   .. method:: SetSelection(self, new_page)

      Sets the page selection. 
                 

      Calling this method will generate a page change event. 
                 


      :param `new_page`: 
      :type `new_page`: int




      :rtype: `int`








   .. method:: 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 :meth:`SetUniformBitmapSize` . 

      Specifying -1 as the height will return the control to its default auto-sizing behaviour. 

      If the control uses  ``AUI_NB_MULTILINE``   style, the  `height`  parameter specifies the height of a single row of tabs and not the combined height of all rows. 
                 


      :param `height`: 
      :type `height`: int




      :rtype: `None`     








   .. method:: SetUniformBitmapSize(self, size)

      Ensure that all tabs have the same height, even if some of them don't have bitmaps. 
                 

      Passing `wx.DefaultSize`       as `size`  undoes the effect of a previous call to this function and instructs the control to use dynamic tab height. 
                 


      :param `size`: 
      :type `size`: wx.Size




      :rtype: `None`     








   .. method:: ShowWindowMenu(self)

      Shows the window menu for the active tab control associated with this notebook, and returns ``True`` if a selection was made. 
                 

      :rtype: `bool`








   .. method:: Split(self, page, direction)

      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: ``wx.TOP``, ``wx.BOTTOM``, ``wx.LEFT``, or ``wx.RIGHT``. 


                


      :param `page`: 
      :type `page`: int
      :param `direction`: 
      :type `direction`: int




      :rtype: `None`     







      .. seealso:: :meth:`UnsplitAll`     








   .. method:: UnsplitAll(self)

      Remove all split tab controls, leaving only the single one. 
                 

      This is the opposite of :meth:`Split`   function and collects all the pages from all tab controls in the central tab control and removes the other ones. 

      If there are no other tab controls, this function doesn't do anything. 

      Note that calling :meth:`Split`   followed by :meth:`UnsplitAll`   does `not`  preserve the page order, as all previously split pages are added at the end of the main tab control and not at their previous positions. 


                

      :rtype: `None`     







      .. versionadded:: 4.3/wxWidgets-3.3.0  
     








   .. attribute:: ActiveTabCtrl

      See :meth:`~wx.aui.AuiNotebook.GetActiveTabCtrl`


   .. attribute:: ArtProvider

      See :meth:`~wx.aui.AuiNotebook.GetArtProvider` and :meth:`~wx.aui.AuiNotebook.SetArtProvider`


   .. attribute:: CurrentPage

      See :meth:`~wx.aui.AuiNotebook.GetCurrentPage`


   .. attribute:: MainTabCtrl

      See :meth:`~wx.aui.AuiNotebook.GetMainTabCtrl`


   .. attribute:: PageCount

      See :meth:`~wx.aui.AuiNotebook.GetPageCount`


   .. attribute:: Selection

      See :meth:`~wx.aui.AuiNotebook.GetSelection` and :meth:`~wx.aui.AuiNotebook.SetSelection`


   .. attribute:: TabCtrlHeight

      See :meth:`~wx.aui.AuiNotebook.GetTabCtrlHeight` and :meth:`~wx.aui.AuiNotebook.SetTabCtrlHeight`

