File: bookctrl_overview.rst

package info (click to toggle)
wxpython4.0 4.2.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 221,752 kB
  • sloc: cpp: 962,555; python: 230,573; ansic: 170,731; makefile: 51,756; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (50 lines) | stat: -rw-r--r-- 2,027 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.. include:: headings.inc


.. _bookctrl overview:

======================================
|phoenix_title|  **BookCtrl Overview**
======================================


Introduction
------------

A book control is a convenient way of displaying multiple pages of information, displayed one page at a time.
wxPython has five variants of this control:

- :ref:`wx.Choicebook`: controlled by a :ref:`wx.Choice`
- :ref:`wx.Listbook`: controlled by a :ref:`wx.ListCtrl`
- :ref:`wx.Notebook`: uses a row of tabs
- :ref:`wx.Treebook`: controlled by a :ref:`wx.TreeCtrl`
- :ref:`wx.Toolbook`: controlled by a :ref:`wx.ToolBar`



Best Book
---------

:ref:`wx.BookCtrlBase` is mapped to the class best suited for a given
platform. Currently it provides :ref:`wx.Choicebook` for smartphones
equipped with WinCE, and :ref:`wx.Notebook` for all other platforms. The
mapping consists of:

=============================================== ==================================================
`wx.BookCtrl`                                   `wx.Choicebook` or `wx.Notebook`
=============================================== ==================================================
``wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED``	        ``wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED`` or ``wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED``
``wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING``        ``wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING`` or ``wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING``
EVT_BOOKCTRL_PAGE_CHANGED                       EVT_CHOICEBOOK_PAGE_CHANGED or EVT_NOTEBOOK_PAGE_CHANGED
EVT_BOOKCTRL_PAGE_CHANGING                      EVT_CHOICEBOOK_PAGE_CHANGING or EVT_NOTEBOOK_PAGE_CHANGING
=============================================== ==================================================


For orientation of the book controller, use following flags in style:

- ``wx.BK_TOP``: controller above pages
- ``wx.BK_BOTTOM``: controller below pages
- ``wx.BK_LEFT``: controller on the left
- ``wx.BK_RIGHT``: controller on the right
- ``wx.BK_DEFAULT``: native controller placement