Returns or sets the width in pixels of the caption in the object.
Object.CaptionWidth [ = lCaptionWidth ]
The CaptionWidth property syntax has the following parts:
|
Name |
Type |
Description |
|
Object |
ASwitch |
ASwitch control |
|
lCaptionWidth |
An integer specifying the width of the caption on the object |
The default value is -1, which means that:
In clipped mode, the caption size will be clipped or cut as needed to fit in area designated in the control face area.
In stretch mode, the caption will be expanded or shrunk to fit in the area designated in the control face area.
The following statement changes the ASwitch's CaptionWidth so the caption is ten pixels wide in the face area of the switch.
sw1.CaptionWidth=10
CaptionColor, CaptionFont, CaptionHeight, CaptionLeft, CaptionTop