<< Click to display table of contents >> TSRVTabSet |
The TSRVTabSet component presents horizontal or vertical tabs users can click to initiate actions.
Unit SRVTabSet.
Syntax
TSRVTabSet = class(TCustomControl);
TObject
TPersistent
TComponent
TControl
TWinControl
TCustomControl
You create a set of tabs for the tab set control when you specify a list of items as the value of the Tabs property. One tab is created for each item.
To determine which tab is currently selected or to use code to select a tab, use the TabIndex property. To find out which tab is the first/last visible tab in the tab set control use the FirstTabIndex/LastTabIndex properties. To make the tab visible, use ScrollToTab.
The user can close tabs, if closing buttons are displayed. Properties of these buttons are specified in CloseButton property.
Tabs can have icons from ImageList.
Tabs are displayed horizontally or vertically, depending on the value of Kind property.
By default, tabs are positioned at the top (for a horizontal ruler) / the left (for a vertical ruler) of the control. To move them to bottom / right, assign True to OppositeTabPosition.
By default, left-to-right text is displayed from left to right (for a horizontal ruler) / from bottom to top (for a vertical ruler). To display it upside down / from top to bottom, assign True to MirrorText.
By default, tabs are ordered from left to right. Using BiDiMode property, you can order them from from right to left (BiDiMode does not affect tab order in a vertical ruler).
The following properties affect the size of tabs: AutoWidth, MinTabSize, MaxTabSize, TabHeight.
The following properties affect the layout of each tab: Indent, Margins, MirrorText, TextAlignH, TextAlignV.
If skins are not defined, the tab set appearance depends on SRVControlStyle property:
srvcsSimple (if RVControlsPainter.Theme = rvctPaleBlue):
srvcsClassic:
TSRVTabSet is a skinnable component. Skins are used when SkinManager and SkinSchemeIndex properties are assigned. You can draw various parts of the control yourself using custom drawing events.
Tabs can be moved with the mouse, if CanMoveTabs is True. When moving, OnMoveTab event occurs.