The list of captions to appear on the button's surface.

Usage

Set_Property(OLECtrlEntID, "OLE.CaptionList", StringValue)

Values

StringValue can be any string meeting the following format requirements:

Syntax: @FM delimited list of captions

Default: ""

Remarks

The CaptionList property adds unique functionality to the SRP Button Control. The Caption property is useful for adding a single centered caption, which meets most basic needs. The CaptionList property allows you to place any number of captions aligned and formatted as you see fit.

The CaptionList property is an @FM delimited list of captions. Each field is multivalued with the following structure:

PosNameTypeDescription
<1, 1>CaptionTextThe caption text
<1, 2>Horizontal AlignmentFormatted StringHorizontal alignment of the caption
<1, 3>Vertical AlignmentFormatted StringVertical alignment of the caption
<1, 4>FontFontFont used to render the caption
<1, 5>ColorColorColor used to render the caption

The Caption value is simply the text you wish to display.

The Horizontal Alignment and Vertical Alignment values are especially formatted for flexibility. For simple alignment, set the horizontal alignment to L, C, or R for Left, Center, or Right alignment respectively. Likewise, set the vertical alignment to T, C, or B for Top, Center, or Bottom respectively.

For additional precision, you can append a numerical offset to the alignment value. For example, setting the horizontal alignment to "L10" means you want the caption left aligned and offset 10 pixels to the right. To offset from the right or bottom, use negative numbers. For example, "B-10" indicates you want the caption bottom aligned and offset 10 pixels up.

The Font value uses the standard Font array to set the font used to render the caption. This way, you can have multiple captions with different fonts

The Color value uses any valid Color setting.

Ideas on Customizing Captions and Icons

For more information and ideas regarding caption and icon lists, see the CaptionList and IconList topic.

Example

// Set a button whose caption is "Hello World" with each word in opposite corners 
CaptionList = "" 
CaptionList<1> = "Hello":@VM:"L":@VM:"T" 
CaptionList<2> = "World":@VM:"R":@VM:"B" 
Set_Property(@Window:".OLE_BUTTON", "OLE.CaptionList", CaptionList)

See Also

CaptionIconList

  • No labels