Changed July 2013
Global attributes are signaled by a leading "@", followed by one or more clauses of the form attrib=value~, and ending with an extra ~ (two in a row). If the first character of ctext is not "@" then it is assumed there are no global attributes and parsing proceeds with the labeldefs.
Attribute |
Value |
Description |
|||
---|---|---|---|---|---|
style |
Number |
sets the overall style; see descriptions in the following table (not this one) |
|||
scrollstyle |
Number |
sets style of scroll buttons, from following table: |
|||
"none" |
No scroll buttons |
||||
0 |
Windows 3.1 style |
||||
1 |
Windows 95 style |
||||
2 |
Standard style |
||||
3 |
Windows 95 alternate style |
||||
4 |
Theme buttons |
||||
5 |
Theme/scroll |
||||
6 |
Hover |
||||
7 |
Theme/scroll alternate |
||||
bold |
0/1 |
if 1, current label text is to be displayed in bold |
|||
xbtnVisible |
0/1 |
if 1, an "x" button will be visible, theoretically to close the current tab. When clicked, it sends exitcode -69. |
|||
xbtnEnabled |
0/1 |
Controls whether the "x" button is enabled or disabled |
|||
xbtnTip |
text |
tooltip for the "x" button |
|||
xbtnAlign |
near|far|center |
controls how close the "x" button is to the last tab label |
|||
themes |
0/1 |
use visual themes or not. (using them may disable a number of other features relating to color) |
|||
sbtn |
Number |
scroll button options (sum of):+1=scrollable (and visible), +2=conditional visibility (only if needed), +4=buttons displayed at start/left instead of at right/end |
|||
sbtnAlign |
near|far|center |
same idea as xbtnAlign but for the scroll buttons |
|||
forcedSize |
Number |
forced height (if horizontal) or width (if vertical). Units are {milli}rows or columns, unless MBF2_PIXSIZE, in which case units are pixels. |
|||
ClientArea |
0/1 |
determines if the tab control has a client area (attached panel). See TABSTRIP.BP in SOSLIB:[908,22] for example with ClientArea=0. |
|||
rows |
Number |
Number of rows of labels; may require sbtn=0; see Note1 below. |
|||
rowTabs |
Number |
Number of tabs per row (if fixed tabs); may require sbtn=0; see Note1 below. |
|||
fixedTabs |
0/1 |
fixed width tabs. If fixedTabs=0, tab size will be based on the text in each tab; othewise all tabs will be same width. If rowTabs=0, tab width will be determined by actual number of tabs, spread evenly to fill the panel width. To make tab width smaller, set rowTabs larger. |
|||
multiLine |
0/1 |
if 1, tab labels may have multiple lines using chr(13) for line break. |
|||
panelBorder |
0/1 |
controls if panel/client area has a border |
|||
font
fontAttr |
facename {,fontattr}
Number |
Font=facename{,fontattr} and fontAttr=# provide alternate ways of specifying the same exact set of font attributes. Use which ever form you prefer with values from the following table. |
|||
Symbol |
Value |
Description |
|||
FS_UPRIGHT |
&h00 |
Normal upright |
|||
FS_ITALIC |
&h01 |
Italic |
|||
FS_UNDERLINE |
&h02 |
Underline |
|||
FS_STRIKEOUT |
&h04 |
Strikeout |
|||
fontFace |
facename |
alternate method of specifying the label text font. |
|||
fontScale or scale |
<percent> |
optional font scale to use for the label text |
|||
RGBxxx |
r,g,b |
All RGBxxx attributes defined for labeldefs may be used here as well. |
Note1: Unlike the traditional Tab Control style option TCS_MULTILINE, which results in a variable number of rows of tab labels (as required to display them all), the TabX control requires, if you want multiple rows of labels instead of a single scrolling row, that you explicitly specify the number of label rows (rows=#). This is actually a sensible limitation, since each additional row of labels subtracts from the client/display area available to the panels. Without knowing how much space is available in the client/display area, it would be difficult to lay out your child controls. In situations where the number of tab labels is unknown at design time, it is probably best to stick with scrolling labels; see sbtn.
Style
The style parameters sets the overall style, using values as shown in the following table. See the TabX Operations / Examples section. Also note the following symbol naming conventions:
• | _ L = Tab labels on left side (instead of default which is top) |
• | _R = Tab labels on right side |
• | _LR = Tab labels on left and right (requires even number of tab rows) |
• | _TB = Tab labels on top and bottom (requires even number of tab rows) |
• | _V = Labels rotated (vertical, not compatible with multiLine attribute) |
The source of these values and symbols is the included file TABX.DEF in SOSLIB:[907,16].
Symbol |
Value |
Description |
|
Symbol |
Value |
Description |
TBXSTY_STD |
0 |
Standard style, labels on top |
|
TBXSTY_SQ_L_V |
38 |
|
TBXSTY_STD_L |
1 |
|
|
TBXSTY_SQ_R |
39 |
|
TBXSTY_STD_L_V |
2 |
|
|
TBXSTY_SQ_R_V |
40 |
|
TBXSTY_STD_R |
3 |
|
|
TBXSTY_SQ_B |
41 |
|
TBXSTY_STD_R_V |
4 |
|
|
TBXSTY_SQ_TB |
42 |
|
TBXSTY_STD_B |
5 |
|
|
TBXSTY_SQ_LR_V |
43 |
|
TBXSTY_STD_II |
6 |
Standard style II, labels on top |
|
TBXSTY_SQ2 |
44 |
Square style with edge |
TBXSTY_STD_II_L |
7 |
|
|
TBXSTY_SQ2_L |
45 |
|
TBXSTY_STD_II_L_V |
8 |
|
|
TBXSTY_SQ2_L_V |
46 |
|
TBXSTY_STD_II_R |
9 |
|
|
TBXSTY_SQ2_R |
47 |
|
TBXSTY_STD_II_R_V |
10 |
|
|
TBXSTY_SQ2_R_V |
48 |
|
TBXSTY_STD_II_B |
11 |
|
|
TBXSTY_SQ2_B |
49 |
|
TBXSTY_WIZARD |
12 |
(Invisible) |
|
TBXSTY_SQ2_TB |
50 |
|
TBXSTY_SIMP |
13 |
Simple, top labels |
|
TBXSTY_SQ2_LR_V |
51 |
|
TBXSTY_SIMP_B |
14 |
Simple, bottom labels |
|
TBXSTY_LSQ |
52 |
Another square style |
TBXSTY_MOD_I |
21 |
Modern style I, labels on |
|
TBXSTY_LSQ_L |
53 |
|
TBXSTY_MOD_I_L_V |
22 |
|
|
TBXSTY_LSQ_L_V |
54 |
|
TBXSTY_MOD_I_R_V |
23 |
|
|
TBXSTY_LSQ_R |
55 |
|
TBXSTY_MOD_I_B |
24 |
|
|
TBXSTY_LSQ_R_V |
56 |
|
TBXSTY_MOD_I_L |
25 |
|
|
TBXSTY_LSQ_B |
57 |
|
TBXSTY_MOD_I_R |
26 |
|
|
TBXSTY_LSQ_TB |
58 |
|
TBXSTY_SIMP_II |
27 |
Simple II, top |
|
TBXSTY_LSQ_LR_V |
59 |
|
TBXSTY_SIMP_II_B |
28 |
|
|
TBXSTY_MOD_II |
60 |
Modern style II |
TBXSTY_SIMP_III_B |
29 |
Simple III, bottom |
|
TBXSTY_MOD_II_L_V |
61 |
|
TBXSTY_STD_TB |
30 |
Standard style, top/bottom labels |
|
TBXSTY_MOD_II_R_V |
62 |
|
TBXSTY_STD_LR |
31 |
|
|
TBXSTY_MOD_II_B |
63 |
|
TBXSTY_STD_LR_V |
32 |
|
|
TBXSTY_MOD_II_TB |
64 |
|
TBXSTY_MOD_TB |
33 |
Modern style I, top/bottom labels |
|
TBXSTY_MOD_II_LR_V |
65 |
|
TBXSTY_MOD_LR |
34 |
|
|
TBXSTY_BTNS |
66 |
Buttons style |
TBXSTY_MOD_LR_V |
35 |
|
|
TBXSTY_BTNS_L |
67 |
|
TBXSTY_SQ |
36 |
Square style |
|
TBXSTY_BTNS_L_V |
68 |
|
TBXSTY_SQ_L |
37 |
|
|
TBXSTY_BTNS_R |
69 |
|