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

.. currentmodule:: wx.lib.agw.aui.auibook

.. highlight:: python



.. _wx.lib.agw.aui.auibook.AuiTabCtrl:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.aui.auibook.AuiTabCtrl**
==========================================================================================================================================

This is an actual :class:`wx.Window` - derived window which can be used as a tab control in the normal sense.



|

|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>AuiTabCtrl</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.lib.agw.aui.auibook.AuiTabCtrl_inheritance.png" alt="Inheritance diagram of AuiTabCtrl" 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.lib.agw.aui.auibook.AuiTabCtrl.html" title="wx.lib.agw.aui.auibook.AuiTabCtrl" alt="" coords="93,392,335,421"/> <area shape="rect" id="node2" href="wx.Control.html" title="wx.Control" alt="" coords="63,315,155,344"/> <area shape="rect" id="node3" href="wx.lib.agw.aui.auibook.AuiTabContainer.html" title="wx.lib.agw.aui.auibook.AuiTabContainer" alt="" coords="179,315,460,344"/> <area shape="rect" id="node4" href="wx.Window.html" title="wx.Window" alt="" coords="60,237,157,267"/> <area shape="rect" id="node5" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="44,160,173,189"/> <area shape="rect" id="node6" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="50,83,167,112"/> <area shape="rect" id="node7" href="wx.Object.html" title="wx.Object" alt="" coords="5,5,92,35"/> <area shape="rect" id="node8" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="117,5,223,35"/> </map> 
   </p>
   </div>

|


|super_classes| Known Superclasses
==================================

:class:`wx.Control`, :class:`wx.lib.agw.aui.auibook.AuiTabContainer`

|


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

================================================================================ ================================================================================
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.__init__`                              Default class constructor.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.DoGetBestSize`                         Gets the size which best suits the window: for a control, it would be the
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.GetDefaultBorder`                      Returns the default border style for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.GetPointedToTab`                       Returns the page at which the mouse is pointing (if any).
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.IsDragging`                            Returns whether the user is dragging a tab with the mouse or not.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnButton`                              Handles the ``EVT_AUINOTEBOOK_BUTTON`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnCaptureLost`                         Handles the ``wx.EVT_MOUSE_CAPTURE_LOST`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnEnterWindow`                         Handles the ``wx.EVT_ENTER_WINDOW`` event fof :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnEraseBackground`                     Handles the ``wx.EVT_ERASE_BACKGROUND`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnKeyDown`                             Handles the ``wx.EVT_KEY_DOWN`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnKeyDown2`                            Handles the ``wx.EVT_KEY_DOWN`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnKillFocus`                           Handles the ``wx.EVT_KILL_FOCUS`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnLeaveWindow`                         Handles the ``wx.EVT_LEAVE_WINDOW`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnLeftDClick`                          Handles the ``wx.EVT_LEFT_DCLICK`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnLeftDown`                            Handles the ``wx.EVT_LEFT_DOWN`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnLeftUp`                              Handles the ``wx.EVT_LEFT_UP`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnMiddleDown`                          Handles the ``wx.EVT_MIDDLE_DOWN`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnMiddleUp`                            Handles the ``wx.EVT_MIDDLE_UP`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnMotion`                              Handles the ``wx.EVT_MOTION`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnPaint`                               Handles the ``wx.EVT_PAINT`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnRightDown`                           Handles the ``wx.EVT_RIGHT_DOWN`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnRightUp`                             Handles the ``wx.EVT_RIGHT_UP`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnSetFocus`                            Handles the ``wx.EVT_SET_FOCUS`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.OnSize`                                Handles the ``wx.EVT_SIZE`` event for :class:`AuiTabCtrl`.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.RestartTooltipTimer`                   Starts a timer: when it fires, a tooltip will be shown on the notebook tab
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.ShowTooltip`                           Shows the tooltip on the tab.
:meth:`~wx.lib.agw.aui.auibook.AuiTabCtrl.StopTooltipTimer`                      Stops the timer keeping track of tooltips and mouse movements on the tab area.
================================================================================ ================================================================================


|


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


.. class:: AuiTabCtrl(wx.Control, AuiTabContainer)

   This is an actual :class:`wx.Window` - derived window which can be used as a tab control in the normal sense.

   .. method:: __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.NO_BORDER|wx.WANTS_CHARS|wx.TAB_TRAVERSAL)

      Default class constructor.
      Used internally, do not call it in your code!
      
      :param `parent`: the :class:`AuiNotebook` parent;
      :param integer `id`: an identifier for the control: a value of -1 is taken to mean a default;
      :param wx.Point `pos`: the control position. A value of (-1, -1) indicates a default position,
       chosen by either the windowing system or wxPython, depending on platform;
      :param wx.Size `size`: the control size. A value of (-1, -1) indicates a default size,
       chosen by either the windowing system or wxPython, depending on platform;
      :param integer `style`: the window style.


   .. method:: DoGetBestSize(self)

      Gets the size which best suits the window: for a control, it would be the
      minimal size which doesn't truncate the control, for a panel - the same
      size as it would have after a call to `Fit()`.
      
      :note: Overridden from :class:`wx.Control`.


   .. method:: GetDefaultBorder(self)

      Returns the default border style for :class:`AuiTabCtrl`. 


   .. method:: GetPointedToTab(self)

      Returns the page at which the mouse is pointing (if any).
      
      :rtype: :class:`wx.Window`.


   .. method:: IsDragging(self)

      Returns whether the user is dragging a tab with the mouse or not. 


   .. method:: OnButton(self, event)

      Handles the ``EVT_AUINOTEBOOK_BUTTON`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`AuiNotebookEvent` event to be processed.


   .. method:: OnCaptureLost(self, event)

      Handles the ``wx.EVT_MOUSE_CAPTURE_LOST`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`MouseCaptureLostEvent` event to be processed.


   .. method:: OnEnterWindow(self, event)

      Handles the ``wx.EVT_ENTER_WINDOW`` event fof :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnEraseBackground(self, event)

      Handles the ``wx.EVT_ERASE_BACKGROUND`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`EraseEvent` event to be processed.
      
      :note: This is intentionally empty, to reduce flicker.


   .. method:: OnKeyDown(self, event)

      Handles the ``wx.EVT_KEY_DOWN`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`KeyEvent` event to be processed.


   .. method:: OnKeyDown2(self, event)

      Handles the ``wx.EVT_KEY_DOWN`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`KeyEvent` event to be processed.
      
      .. deprecated:: 0.6
         This implementation is now deprecated. Refer to :meth:`OnKeyDown` for the correct one.


   .. method:: OnKillFocus(self, event)

      Handles the ``wx.EVT_KILL_FOCUS`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`FocusEvent` event to be processed.


   .. method:: OnLeaveWindow(self, event)

      Handles the ``wx.EVT_LEAVE_WINDOW`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnLeftDClick(self, event)

      Handles the ``wx.EVT_LEFT_DCLICK`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnLeftDown(self, event)

      Handles the ``wx.EVT_LEFT_DOWN`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnLeftUp(self, event)

      Handles the ``wx.EVT_LEFT_UP`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnMiddleDown(self, event)

      Handles the ``wx.EVT_MIDDLE_DOWN`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnMiddleUp(self, event)

      Handles the ``wx.EVT_MIDDLE_UP`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnMotion(self, event)

      Handles the ``wx.EVT_MOTION`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnPaint(self, event)

      Handles the ``wx.EVT_PAINT`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`PaintEvent` event to be processed.


   .. method:: OnRightDown(self, event)

      Handles the ``wx.EVT_RIGHT_DOWN`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnRightUp(self, event)

      Handles the ``wx.EVT_RIGHT_UP`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnSetFocus(self, event)

      Handles the ``wx.EVT_SET_FOCUS`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`FocusEvent` event to be processed.


   .. method:: OnSize(self, event)

      Handles the ``wx.EVT_SIZE`` event for :class:`AuiTabCtrl`.
      
      :param `event`: a :class:`wx.SizeEvent` event to be processed.


   .. method:: RestartTooltipTimer(self, wnd)

      Starts a timer: when it fires, a tooltip will be shown on the notebook tab
      the mouse is pointing at.
      
      :param wx.Window `wnd`: the window pointed by the mouse.


   .. method:: ShowTooltip(self)

      Shows the tooltip on the tab. 


   .. method:: StopTooltipTimer(self)

      Stops the timer keeping track of tooltips and mouse movements on the tab area. 


