Tab Strip
A tab strip widget is a container made up of multiple tabs that enables you to group widgets tab by tab.
A tab strip has two tabs by default. As an application designer, you can add more tabs to a tab strip and insert any widgets into different tabs according to your needs. When you move, copy, delete, show, or hide a tab strip, all the tabs and widgets in the tab strip will change accordingly.
The tab strip widget has the following specific properties:
Property |
Property Value |
Property Description |
---|---|---|
Name |
String |
Defines the unique name of a tab strip. If you do not enter a name, the system takes the default name (for example TabStrip_1). |
Property |
Property Value |
Property Description |
---|---|---|
Selected |
Color |
Specifies the color of the selected tab text in the tab strip. |
Header Background |
Color |
Specifies the color of the header background. |
After adding a tab strip widget to the canvas or popup, as an application designer you can write scripts to set the tab's text or acquire the tab's key or text. For example:
// Returns the key of the selected tab and adds it to Dropdown_1. var selectedTabKey = TabStrip_1.getSelectedKey(); Dropdown_1.addItem(selectedTabKey); // Returns the key of the specified tab Tab_1 and adds it to Dropdown_1. var tabKey = TabStrip_1.getTab(“Tab_1”).getKey(); Dropdown_1.addItem(tabKey); // Change the text of the specified tab Tab_1 to "New Text". TabStrip_1.getTab(“Tab_1”).setText("New Text");
For more information about the tab strip APIs, refer to Analytics Designer API Reference.