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

==========================================================================================================================================
|phoenix_title|  **wx.Simplebook**
==========================================================================================================================================

:ref:`wx.Simplebook`  is a control showing exactly one of its several pages.          

It implements :ref:`wx.BookCtrlBase`  class interface but doesn't allow the user to change the page being displayed, unlike all the other book control classes, only the program can do it. 

This class is created in the same manner as any other BookCtrl but then the program will typically call :meth:`~wx.Simplebook.ChangeSelection`  to show different pages. See the :ref:`Notebook Sample <notebook sample>`  for an example of :ref:`wx.Simplebook`  in action. 

Notice that it is often convenient to use :meth:`~wx.Simplebook.ShowNewPage`  instead of the base class :meth:`~wx.Simplebook.AddPage`. 

There are no special styles defined for this class as it has no visual appearance of its own. 

There are also no special events, this class reuses  ``wxEVT_BOOKCTRL_PAGE_CHANGING``   and   ``wxEVT_BOOKCTRL_PAGE_CHANGED``   events for the events it generates if the program calls  :meth:`~wx.Simplebook.SetSelection`. 





         



.. versionadded:: 2.9.5 
     







.. seealso:: :ref:`wx.BookCtrl`, :ref:`wx.Notebook`, :ref:`Notebook Sample <notebook sample>`  







|

|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>Simplebook</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.Simplebook_inheritance.png" alt="Inheritance diagram of Simplebook" 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.Simplebook.html" title="wx.Simplebook" alt="" coords="113,392,235,421"/> <area shape="rect" id="node2" href="wx.BookCtrlBase.html" title="wx.BookCtrlBase" alt="" coords="107,315,241,344"/> <area shape="rect" id="node3" href="wx.Control.html" title="wx.Control" alt="" coords="63,237,155,267"/> <area shape="rect" id="node4" href="wx.WithImages.html" title="wx.WithImages" alt="" coords="179,237,302,267"/> <area shape="rect" id="node5" href="wx.Window.html" title="wx.Window" alt="" coords="60,160,157,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>

|


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

================================================================================ ================================================================================
:meth:`~wx.Simplebook.__init__`                                                  Default constructor.
:meth:`~wx.Simplebook.Create`                                                    Really create the window of an object created using default constructor.
:meth:`~wx.Simplebook.GetClassDefaultAttributes`                                 
:meth:`~wx.Simplebook.SetEffect`                                                 Set the same effect to use for both showing and hiding the pages.
:meth:`~wx.Simplebook.SetEffectTimeout`                                          Set the same effect timeout to use for both showing and hiding the pages.
:meth:`~wx.Simplebook.SetEffects`                                                Set the effects to use for showing and hiding the pages.
:meth:`~wx.Simplebook.SetEffectsTimeouts`                                        Set the effect timeout to use for showing and hiding the pages.
:meth:`~wx.Simplebook.ShowNewPage`                                               Add a new page and show it immediately.
================================================================================ ================================================================================


|


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


.. class:: wx.Simplebook(BookCtrlBase)

   **Possible constructors**::

       Simplebook()
       
       Simplebook(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize,
                  style=0, name=EmptyString)
       
   
   Simplebook is a control showing exactly one of its several pages.



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



      |overload| Overloaded Implementations:

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

      
      **__init__** `(self)`
      
      Default constructor.                  
      
      Use :meth:`Create`   later to really create the control.                   
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0, name=EmptyString)`
      
      Constructs a simple book 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
      :param `name`: 
      :type `name`: string
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






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

      Really create the window of an object created using default constructor.                  

                


      :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
      :param `name`: 
      :type `name`: string




      :rtype: `bool`







      .. versionadded:: 4.0/wxWidgets-3.0.2  
     








   .. staticmethod:: GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)




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




      :rtype: :ref:`wx.VisualAttributes`








   .. method:: SetEffect(self, effect)

      Set the same effect to use for both showing and hiding the pages.                  

      This is the same as  ``SetEffects(effect, effect)`` . 

                


      :param `effect`: 
      :type `effect`: wx.ShowEffect






      .. seealso:: :meth:`SetEffectTimeout`     








   .. method:: SetEffectTimeout(self, timeout)

      Set the same effect timeout to use for both showing and hiding the pages.                  

      This is the same as  ``SetEffectsTimeouts(timeout, timeout)`` . 

                


      :param `timeout`: 






      .. seealso:: :meth:`SetEffect`     








   .. method:: SetEffects(self, showEffect, hideEffect)

      Set the effects to use for showing and hiding the pages.                  

      This method allows specifying the effects passed to :meth:`wx.Window.ShowWithEffect`   and :meth:`wx.Window.HideWithEffect`   respectively when the pages need to be shown or hidden. 

      By default, no effects are used, but as the pages are only changed by the program and not the user himself, it may be useful to use some visual effects to make the changes more noticeable. 




      :param `showEffect`: The effect to use for showing the newly selected page.   
      :type `showEffect`: wx.ShowEffect
      :param `hideEffect`: The effect to use for hiding the previously selected page.  
      :type `hideEffect`: wx.ShowEffect






                  



      .. seealso:: :meth:`SetEffectsTimeouts`     








   .. method:: SetEffectsTimeouts(self, showTimeout, hideTimeout)

      Set the effect timeout to use for showing and hiding the pages.                  

      This method allows configuring the timeout arguments passed to :meth:`wx.Window.ShowWithEffect`   and :meth:`wx.Window.HideWithEffect`   if a non-default effect is used. 

      If this method is not called, default, system-dependent timeout is used. 




      :param `showTimeout`: Timeout of the show effect, in milliseconds.   
      :param `hideTimeout`: Timeout of the hide effect, in milliseconds.  






                  



      .. seealso:: :meth:`SetEffects`     








   .. method:: ShowNewPage(self, page)

      Add a new page and show it immediately.                  

      This is simply a thin wrapper around the base class :meth:`wx.BookCtrlBase.AddPage`   method using empty label (which is unused by this class anyhow) and selecting the new page immediately.                  


      :param `page`: 
      :type `page`: wx.Window




      :rtype: `bool`







