Skip to main content

CaptionAlignment Property

The caption alignment within the control's bounds.

Definition​

Property "OLE.CaptionAlignment" as Record

Values​

This property has the following record structure:

PosNameTypeDescriptionDefault
<1>Vertical AlignmentString (See Remarks)Aligns the caption vertically"Center"
<2>Horizontal AlignmentString (See Remarks)Aligns the caption horizontally"Center"

Remarks​

The CaptionAlignment property aligns the caption along any edge of the control. This multivalued property has two fields: vertical alignment and horizontal alignment. Possible values for vertical alignment are:

ValueDescription
"Top" or "T"Places caption along the top of the control
"Center" or "C"Places caption in the vertical center of the control
"Bottom" or "B"Places caption along the bottom of the control

Possible values for horizontal alignment are:

ValueAbbr.Description
"Left" or "L"Places caption along the left side of the control
"Center" or "C"Places caption in the horizontal center of the control
"Right" or "R"Places caption along the right side of the control

Use both fields to position the caption anywhere within the control.

Example​

// Align the caption to the control's top left sides
Set_Property(@Window:".OLE_PICTURE", "OLE.CaptionAlignment", "Top":@FM:"Left")

See Also​

Alignment