SetStyle Method (TABCONTROL)
PLBCMP GUI Only, 9.4C
The SetStyle method sets or clears style control bits for a TABCONTROL object. The method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A TABCONTROL object that is accessed.
return
Optional. A Numeric Variable whose returned value is the current style bit mask.
style
Required. A numeric bit mask value to be applied to the TABCONTROL.
mode
Required. A numeric value that identifies whether the bit mask value in the {style] is to be set or cleared.
Flags Affected: EOS, OVER, ZERO
Note the following:
If the value returned is zero, the ZERO Condition Flag is set.
The OVER Condition Flag is set if the {return} value is too large to be stored without truncation.
The EOS Condition Flag are always cleared.
The {return} value is the current TABCONTROL object style bit mask that is being used.
The bit mask value that is stored in the {style} variable is described in the Microsoft MSDN documentation for a tabcontrol object. Only certain TABCONTROL styles can be changed after the object has been created. The following TABCONTROL style definitions can be set using a SetStyle method:
|
Value |
Style |
Description |
|
0x8 |
$TCS_FLATBUTTONS |
Selected tabs for the TABCONTROL appear as being indented into the background while other tabs appear as being on the same plane as the background. This style only affects tab controls with the TCS_BUTTONS style. |
|
0x10 |
$TCS_FORCEICONLEFT |
The TABCONTROL imagelist images are aligned with the left edge of each fixed-width tab. This style can only be used with the TCS_FIXEDWIDTH style. |
|
0x20 |
$TCS_FORCELABELLEFT |
Text for the tabs are aligned with the left edge of each fixed-width tab. The label is displayed immediately to the right of the tab image instead of being centered. This style can only be used with the TCS_FIXEDWIDTH style. It also implies the TCS_FORCEICONLEFT style. |
|
0x40 |
$TCS_HOTTRACK |
Tabs under the mouse pointer are automatically highlighted. This style may or may not be enabled for a Windows system. |
|
0x100 |
$TCS_BUTTONS |
Tabs appear as buttons and no border is drawn around the display area. |
|
0x200 |
$TCS_MULTILINE |
Multiple rows of tabs are displayed, if necessary, so all tabs are visible at once. |
|
0x400 |
$TCS_FIXEDWIDTH |
All tabs are the same width. This style cannot be combined with the TCS_RIGHTJUSTIFY style. |
|
0x800 |
$TCS_RAGGEDRIGHT |
Rows of tabs will not be stretched to fill the entire width of the control when the TCS_MULTILINE style is used. This style is the default. |
The {mode} value indicates whether the style control bits are to be set or cleared for the TABCONTROL object. If the {mode} value is non-zero, the style control bits are set for the TABCONTROL. If the {mode} value is zero, the style control bits are cleared.
The behavior/presentation that occurs when using the SetStyle method depends solely
on the Windows system/version that is being used. The PLB runtime does
not interpret nor attempt to change the behavior as applied by the Windows
when a TABCONTROL style is applied using the SetStyle method.
Warning: Setting the $TCS_MULTILINE style bit to an off state causes the TABCONTROL
tabs to disappear when the TABSTYLE property is set to $TC_RIGHT. This interaction of styles is a Windows
behavior that the runtime can not change. Also, note that the MULTILINE
property for a TABCONTROL has this same interaction.
This method is not available when using the PL/B Web Server.
See Also: Method Syntax, TABCONTROL Methods
![]() |