Phoenix Logo

phoenix_title wx.Simplebook

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

It implements 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 ChangeSelection to show different pages. See the Notebook Sample for an example of wx.Simplebook in action.

Notice that is often convenient to use ShowNewPage instead of the base class 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 SetSelection

New in version 2.9.5.

See also

wx.BookCtrl , wx.Notebook, Notebook Sample


class_hierarchy Class Hierarchy

Inheritance diagram for class Simplebook:

method_summary Methods Summary

__init__ Default constructor.
Create Really create the window of an object created using default constructor.
SetEffect Set the same effect to use for both showing and hiding the pages.
SetEffectTimeout Set the same effect timeout to use for both showing and hiding the pages.
SetEffects Set the effects to use for showing and hiding the pages.
SetEffectsTimeouts Set the effect timeout to use for showing and hiding the pages.
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="")

Simplebook is a control showing exactly one of its several pages.


Methods



__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self)

Default constructor.

Use Create later to really create the control.



__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0, name=””)

Constructs a simple book control.

Parameters:





Create(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0, name="")

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

Parameters:
Return type:

bool

New in version 3.0.2.



SetEffect(self, effect)

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

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

Parameters:effect (ShowEffect) –

See also

SetEffectTimeout



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

Parameters:timeout

See also

SetEffect



SetEffects(self, showEffect, hideEffect)

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

This method allows to specify the effects passed to wx.Window.ShowWithEffect and 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.

Parameters:
  • showEffect (ShowEffect) – The effect to use for showing the newly selected page.
  • hideEffect (ShowEffect) – The effect to use for hiding the previously selected page.


SetEffectsTimeouts(self, showTimeout, hideTimeout)

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

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

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

Parameters:
  • showTimeout – Timeout of the show effect, in milliseconds.
  • hideTimeout – Timeout of the hide effect, in milliseconds.

See also

SetEffects



ShowNewPage(self, page)

Add a new page and show it immediately.

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

Parameters:page (wx.Window) –
Return type:bool