Tour Preview

Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

TabControl

A tabbed navigation control. More...

Import Statement: import Felgo 3.0
Inherits:

TabView

Properties

Signals

Detailed Description

This control can be used for a navigation based on tabs. It is based on the Qt Quick TabView and comes with a default TabViewStyle for a platform-specific look.

Children of TabControl should be NavigationItem objects.

To implement a platform dependent navigation, Navigation can be used instead of TabControl.

Note: TabControl uses a lazy-loading mechanism for the contents of each tab. This means, that the tab contents within each NavigationItem element are created when the tab is opened for the first time.

Example Code

To use tabbed control in your application, the following code can be used:

 Page {
   TabControl {
     NavigationItem {
       title: "Tab #1"
       icon: IconType.arrowleft

       FirstPage { }
     }
     NavigationItem {
       title: "Tab #2"
       icon: IconType.arrowright

       SecondPage { }
     }
   }
 }

Property Documentation

backgroundColor : color

The background color each tab. The default value matches Theme.tabBar.backgroundColor

This property was introduced in Felgo 3.7.0.


barHeight : real

The height of the tab bar in pixel. The default value matches Theme.tabBar.height

This property was introduced in Felgo 3.7.0.


[read-only] currentTab : NavigationItem

Access to the currently visible NavigationItem.


dividerColor : color

The color of the upper divider. The default value matches Theme.tabBar.dividerColor

This property was introduced in Felgo 3.7.0.


fontBold : bool

Whether the tab text label is displayed in bold. The default value matches Theme.tabBar.fontBold

This property was introduced in Felgo 3.7.0.


fontCapitalization : real

The font capitalization of the tab text label. The default value matches Theme.tabBar.fontCapitalization

This property was introduced in Felgo 3.7.0.


iconSize : real

The size of the tab icon in pixel. The default value matches Theme.tabBar.iconSize

This property was introduced in Felgo 3.7.0.


markerColor : color

The color of the bottom marker which shows the selected tab.

The default value matches Theme.tabBar.markerColor

This property was introduced in Felgo 3.7.0.


showIcon : bool

Whether the set NavigationItem::icon should be displayed for the tabs. The default value matches Theme.tabBar.showIcon.

This property was introduced in Felgo 2.7.0.


showOnlySelectedLabel : bool

The color of icon and text for the pressed item. The default value is false.

This property was introduced in Felgo 3.7.0.


textFont : font

This property gives full access to all font settings of the title text within the tabs.

This property was introduced in Felgo 2.12.0.


textMaximumLineCount : int

The Maximum line count for the title text of each tab. The default value matches Theme.tabBar.textMaximumLineCount

This property was introduced in Felgo 3.7.0.


textSize : real

The font size of the tab text label. The default value matches Theme.tabBar.textSize

This property was introduced in Felgo 3.7.0.


titleColor : color

The default color of icon and text for each tab. The default value matches Theme.tabBar.titleColor

This property was introduced in Felgo 3.7.0.


titleDisabledColor : color

The color of icon and text for disabled tabs. The default value matches Theme.tabBar.titleDisabledColor

This property was introduced in Felgo 3.7.0.


titleOffColor : color

The color of icon and text for not selected tabs. The default value matches Theme.tabBar.titleOffColor

This property was introduced in Felgo 3.7.0.


titlePressedColor : color

The color of icon and text for the pressed item. The default value matches Theme.tabBar.titlePressedColor

This property was introduced in Felgo 3.7.0.


Signal Documentation

tabClicked(NavigationItem = tab, int = index)

Called when a tab has been clicked, and its content page will be displayed.