Top  | Previous | Next

Tab Strip

Tab strips are highly<br>
customizable.

Tab strips are highly
customizable.

Description

In general, a tab strip is just a single-selection multiple choice component. In practice it is used anywhere that a user needs to be able to select between multiple windows or screens. It is most commonly used in a docked window to provide automatic window navigation. To support this typical use-case, the tab strip has two navigation modes:

 

1.Swap to Window. (default) The tab strip will automatically call system.nav.swapTo() with the name of the selected tab. This facilitates very easy navigation for most common projects.
2.Disabled. The tab strip doesn't do anything when the tab selection changes. Users can implement their own via property bindings or by responding to the propertyChange scripting event.

 

The tab strips visual style is highly customizable. There are different rendering styles, and things such as fonts, colors, line thicknesses, hover colors, and gradients are customizable within each rendering style. Use the Tab Strip's customizer to come up with a style that suits your project, as well as to manage the tabs that are present. The tabs and their styles are all stored in a dataset property (called Tab Data), so they can be modified at runtime as well.

 

See also:

Typical Navigation Strategy

Properties

Appearance

Background Color

The background color of the component.

Scripting name

background

Data type

Color

Orientation

Orientation of the tab strip.

Scripting name

orientation

Data type

int

Values

0

Top

1

Left

2

Bottom

3

Right

Selected Tab

Name of the selected tab. This is also the name of the window that, if it exists, will be swapped to when this tab is pressed.

Scripting name

selectedTab

Data type

String

Flags

bindable

Renderer

The renderer to use when rendering tabs.

Scripting name

renderer

Data type

int

Values

0

Simple

1

Fancy

2

Folder

Size Mode

The sizing mode tabs use when deciding their size. Automatic means every tab is the same fixed size. Individual lets each tab decide its own size based on the size of its text.

Scripting name

sizeMode

Data type

int

Values

0

Automatic

1

Individual

Text Alignment

The alignment of the tab text.

Scripting name

textAlignment

Data type

int

Values

0

Center

1

Left

2

Right

Text Offset

Padding on the left or right of a tab's text, depending on alignment.

Scripting name

textOffset

Data type

int

Text Padding

Padding on each side of the text inside a tab.

Scripting name

textPadding

Data type

int

Intertab Space

The amount of space between each tab.

Scripting name

interTabSpace

Data type

int

Rounding Radius

Rounding radius for the tab corners.

Scripting name

roundingRadius

Data type

int

Separator Thickness

Thickness of the line drawn across the bottom and around each tab.

Scripting name

separatorThickness

Data type

float

Separator Color

Color of the line drawn across the bottom and around each tab.

Scripting name

separatorColor

Data type

Color

Antialias

Draw with antialias on? Makes text smoother

Scripting name

antialias

Data type

boolean

Flags

expert

Styles

Contains the component's styles

Scripting name

styles

Data type

Dataset

Flags

bindable | expert

Behavior

Navigation Mode

Navigation mode. Disabled does nothing when a tab is pressed. Swap to window swaps to the window whose name corresponds to the name of the selected tab, provided that window exists.

Scripting name

navigationMode

Data type

int

Values

0

Disabled

1

Swap to window

Common

Name

The name of this component.

Scripting name

name

Data type

String

Flags

bindable

Enabled

If disabled, a component cannot be used.

Scripting name

componentEnabled

Data type

boolean

Visible

If disabled, the component will be hidden.

Scripting name

visible

Data type

boolean

Flags

bindable

Border

The border surrounding this component. NOTE that the border is unaffected by rotation.

Scripting name

border

Data type

Border

Cursor

The mouse cursor to use when hovering over this component.

Scripting name

cursorCode

Data type

int

Values

0

Default

1

Crosshair

2

Text

3

Wait

12

Hand

13

Move

4

SW Resize

5

SE Resize

6

NW Resize

7

NE Resize

8

N Resize

9

S Resize

10

W Resize

11

E Resize

Data

Tab Data

Tab Data.

Scripting name

tabData

Data type

Dataset

Data Quality

The data quality code for any tag bindings on this component.

Scripting name

dataQuality

Data type

int

Flags

bindable | expert

Scripting

Events

The following event sets are fired by this component. See Component Event Handlers to learn more.

mouse
mouseMotion
propertyChange

 

Scripting Functions

This component has no special scripting functions.