Skip to content

TabBarView

Examples#

See this.

TabBarView #

Bases: LayoutControl, AdaptiveControl

A page view with one child per tab.

Note

The length of controls must be the same as the length property of the ancestor Tabs.

clip_behavior #

clip_behavior: ClipBehavior = HARD_EDGE

Defines how the controls will be clipped.

controls #

controls: list[Control]

A list of controls, where each control represents the content of a corresponding tab. So, a control at index i in this list is displayed when the Tab at index i is selected.

Note

The length of this list must be equal to the number of tabs specified in an ancestor Tabs control.

viewport_fraction #

viewport_fraction: Number = 1.0

The fraction of the viewport that each page should occupy.

For example, 1.0 (the default), means each page fills the viewport in the scrolling direction.