TabFolder
A widget that can switch between tabs. Only children of type are supported. Since the TabFolder does not compute its own size, the width and height must be defined by the respective layout properties (e.g. either width
or left
and right
must be specified).
Import this type with “const {TabFolder} = require('tabris');
”
iOSAndroid
Type: boolean
Enables swiping through tabs. Always enabled on Windows.
selection
Type: Tab
The currently selected tab.
tabBarLocation
Type: string, supported values: top
, bottom
, hidden
, auto
, default: auto
The placement of the tab titles. When set to , the tab bar will not be visible. When set to "auto"
, the position is platform dependent.This property can only be set on widget creation. Once set, it cannot be changed anymore.
tabMode
Android
Type: string, supported values: fixed
, scrollable
, default: fixed
Controls how the tabs make use of the available horizontal space. Setting the tabMode
to "fixed"
makes the tabs span the entire available space. In case of a very wide TabFolder
the "fixed"
mode centers the tabs. The mode "scrollable"
left aligns the tabs and allows to scroll the tabs if there are more tabs than would fit in the available space. Available on Android only.This property can only be set on widget creation. Once set, it cannot be changed anymore.
Type:
The color used for the text of the tab headers.
win_tabBarTheme
Type: string, supported values: , dark
, default
, default: default
Controls the color scheme used for the tabBar. When set to "default"
the theme is inherited from the TabFolder. Available only on Windows.
pagingChanged
Fired when the paging property has changed.
Event Parameters
value: boolean The new value of paging.
scroll
iOSAndroid
Fired when paging
is enabled and a tab is scrolled. The event
parameter contains position information relative to the currently selected Tab
. Eg.: scrolling a 500px wide tab 10% to the left sets offset
to 50
. Scrolling 10% to the right sets to -50
.
Event Parameters
target: this The widget the event was fired on.
offset: number Number of pixels the current tab has scrolled horizontally.
Event Parameters
target: this The widget the event was fired on.
selection: Tab The new value of selection.
selectionChanged
Fired when the selection property has changed.
Event Parameters
target: this The widget the event was fired on.
textColorChanged
Fired when the property has changed.
Event Parameters
target: this The widget the event was fired on.
value: The new value of textColor.
win_tabBarThemeChanged
Fired when the win_tabBarTheme property has changed.
Event Parameters
target: this The widget the event was fired on.
原文: