.. wxPython Phoenix documentation

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

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

.. include:: headings.inc

.. currentmodule:: wx.lib.agw.labelbook

.. highlight:: python



.. _wx.lib.agw.labelbook.LabelBook:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.labelbook.LabelBook**
==========================================================================================================================================

An implementation of a notebook control - except that instead of having
tabs to show labels, it labels to the right or left (arranged horizontally).



|

|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>LabelBook</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.labelbook.LabelBook_inheritance.png" alt="Inheritance diagram of LabelBook" 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.labelbook.LabelBook.html" title="An implementation of a notebook control - except that instead of having" alt="" coords="16,469,251,499"/> <area shape="rect" id="node2" href="wx.lib.agw.labelbook.FlatBookBase.html" title="Base class for the containing window for LabelBook and FlatImageBook." alt="" coords="5,392,261,421"/> <area shape="rect" id="node3" href="wx.Panel.html" title="A panel is a window on which controls are placed." alt="" coords="93,315,174,344"/> <area shape="rect" id="node4" href="wx.Window.html" title="wx.Window  is the base class for all windows and represents any visible object on screen." alt="" coords="85,237,182,267"/> <area shape="rect" id="node5" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="68,160,199,189"/> <area shape="rect" id="node6" href="wx.EvtHandler.html" title="A class that can handle events from the windowing system." alt="" coords="74,83,193,112"/> <area shape="rect" id="node7" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="28,5,116,35"/> <area shape="rect" id="node8" href="wx.Trackable.html" title="Add-on base class for a trackable object." alt="" coords="141,5,251,35"/> </map> 
   </p>
   </div>

|


|appearance| Control Appearance
===============================

|

.. figure:: _static/images/widgets/fullsize/wxmsw/wx.lib.agw.labelbook.labelbook.png
   :alt: wxMSW
   :figclass: floatleft

   **wxMSW**


.. figure:: _static/images/widgets/fullsize/wxmac/../no_appearance.png
   :alt: wxMAC
   :figclass: floatright

   **wxMAC**


.. figure:: _static/images/widgets/fullsize/wxgtk/../no_appearance.png
   :alt: wxGTK
   :figclass: floatcenter

   **wxGTK**


|




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

:class:`wx.lib.agw.labelbook.FlatBookBase`

|


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

================================================================================ ================================================================================
:meth:`~wx.lib.agw.labelbook.LabelBook.__init__`                                 Default class constructor.
:meth:`~wx.lib.agw.labelbook.LabelBook.CreateImageContainer`                     Creates the image container (LabelContainer) class for :class:`FlatImageBook`.
:meth:`~wx.lib.agw.labelbook.LabelBook.GetColour`                                Returns the colour for the specified parameter.
:meth:`~wx.lib.agw.labelbook.LabelBook.OnSize`                                   Handles the ``wx.EVT_SIZE`` event for :class:`LabelBook`.
:meth:`~wx.lib.agw.labelbook.LabelBook.SetColour`                                Sets the colour for the specified parameter.
================================================================================ ================================================================================


|


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


.. class:: LabelBook(FlatBookBase)

   An implementation of a notebook control - except that instead of having
   tabs to show labels, it labels to the right or left (arranged horizontally).

   .. method:: __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, agwStyle=0, name="LabelBook")

      Default class constructor.
      
      :param `parent`: parent window. Must not be ``None``;
      :param `id`: window identifier. A value of -1 indicates a default value;
      :param `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 `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 `style`: the underlying :class:`Panel` window style;
      :param `agwStyle`: the AGW-specific window style. This can be a combination of the
       following bits:
      
       =========================== =========== ==================================================
       Window Styles               Hex Value   Description
       =========================== =========== ==================================================
       ``INB_BOTTOM``                      0x1 Place labels below the page area. Available only for :class:`FlatImageBook`.
       ``INB_LEFT``                        0x2 Place labels on the left side. Available only for :class:`FlatImageBook`.
       ``INB_RIGHT``                       0x4 Place labels on the right side.
       ``INB_TOP``                         0x8 Place labels above the page area.
       ``INB_BORDER``                     0x10 Draws a border around :class:`LabelBook` or :class:`FlatImageBook`.
       ``INB_SHOW_ONLY_TEXT``             0x20 Shows only text labels and no images. Available only for :class:`LabelBook`.
       ``INB_SHOW_ONLY_IMAGES``           0x40 Shows only tab images and no label texts. Available only for :class:`LabelBook`.
       ``INB_FIT_BUTTON``                 0x80 Displays a pin button to show/hide the book control.
       ``INB_DRAW_SHADOW``               0x100 Draw shadows below the book tabs. Available only for :class:`LabelBook`.
       ``INB_USE_PIN_BUTTON``            0x200 Displays a pin button to show/hide the book control.
       ``INB_GRADIENT_BACKGROUND``       0x400 Draws a gradient shading on the tabs background. Available only for :class:`LabelBook`.
       ``INB_WEB_HILITE``                0x800 On mouse hovering, tabs behave like html hyperlinks. Available only for :class:`LabelBook`.
       ``INB_NO_RESIZE``                0x1000 Don't allow resizing of the tab area.
       ``INB_FIT_LABELTEXT``            0x2000 Will fit the tab area to the longest text (or text+image if you have images) in all the tabs.
       ``INB_BOLD_TAB_SELECTION``       0x4000 Show the selected tab text using a bold font.
       =========================== =========== ==================================================
      
      :param `name`: the window name.


   .. method:: CreateImageContainer(self)

      Creates the image container (LabelContainer) class for :class:`FlatImageBook`. 


   .. method:: GetColour(self, which)

      Returns the colour for the specified parameter.
      
      :param `which`: the colour key.
      
      .. seealso:: :meth:`LabelContainer.SetColour() <LabelContainer.SetColour>` for a list of valid colour keys.


   .. method:: OnSize(self, event)

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


   .. method:: SetColour(self, which, colour)

      Sets the colour for the specified parameter.
      
      :param `which`: the colour key;
      :param `colour`: a valid :class:`wx.Colour` instance.
      
      .. seealso:: :meth:`LabelContainer.SetColour() <LabelContainer.SetColour>` for a list of valid colour keys.