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
|
..
NOTE: This RST file was generated by `make examples`.
Do not edit it directly.
See docs/source/examples/example_doc_generator.py
Notebook Example
===============================================================================
An example of the ``Notebook`` widget.
This example demonstrates the use of the ``Notebook`` widget. A ``Notebook``
displays its children as a tabbed control, where one child is visible
at a time. The children of a ``Notebook`` must be instances of ``Page`` and
parent of a ``Page`` must be a ``Notebook``. A ``Page`` can have at most one
child which must be an instance of ``Container``. This ``Container`` is
expanded to fill the available space in the page. A ``Notebook`` is layed
out using constraints just like normal constraints enabled widgets.
Implementation Notes:
Changing the tab style of the ``Notebook`` dynamically is not
supported on Wx. Close buttons on tabs is not supported on
Wx when using the 'preferences' tab style.
.. TIP:: To see this example in action, download it from
:download:`notebook <../../../examples/widgets/notebook.enaml>`
and run::
$ enaml-run notebook.enaml
Screenshot
-------------------------------------------------------------------------------
.. image:: images/ex_notebook.png
Example Enaml Code
-------------------------------------------------------------------------------
.. literalinclude:: ../../../examples/widgets/notebook.enaml
:language: enaml
|