New in version 3.2.
TabbedPanels are used to save space by stacking different panels on top of one another. While each panel has its own contents only the top panel is visible, thus taking up visual space of only one such panel.
- class reahl.web.bootstrap.tabbedpanel.TabbedPanel(view, nav_layout=None)¶
A Widget that appears as having multiple panels of content stacked on top of one another – with only one panel visible at a time.
Accessed as a property, but is a method:
@exposed query_fields(self, fields)
Override this method to parameterise this Widget.
When accessed as a property for the first time, this method is called, and passed an empty
Inside the method you can declare each argument of the Widget by assigning a
Fieldto an attribute of fields.
When constructed, the Widget uses the names and validation details of each Field to parse values for its arguments from the current query string. The resultant argument values set as attributes on this Widget (with names matching the argument names).
- class reahl.web.bootstrap.tabbedpanel.Tab(view, title, tab_key, contents_factory)¶
One Tab in a
TabbedPanel, including the contents that should be displayed for it.
view – (See
title – The label Text that is displayed inside the Tab itself.
tab_key – A name for this tag identifying it uniquely amongst other Tabs in the same
contents_factory – A
reahl.web.fw.WidgetFactoryspecifying how to create the contents of this Tab, once selected.
- class reahl.web.bootstrap.tabbedpanel.MultiTab(view, title, tab_key)¶
A composite tab. Instead of a single choice for the user, clicking on a MultiTab results in a dropdown menu with more choices for the user. These second-level choices are navigable tabs.