AnnTextExpandTokens property (Annotation Control)

C++ Builder example

Delphi example

 

Builder Syntax

bool AnnTextExpandTokens[HANNOBJECT hObject]

Delphi Syntax

AnnTextExpandTokens[hObject: HANNOBJECT]: Boolean

Overview

Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether the annotation object's text tokens will expand. Possible values are:

Setting

Description

TRUE

Text tokens will be expanded for this object.

FALSE

Text tokens will not be expanded for this object.

This property is valid only for the following annotation objects:

image\sqrblit.gif ANNOBJECT_AUTOMATION

image\sqrblit.gif ANNOBJECT_BUTTON

image\sqrblit.gif ANNOBJECT_NOTE

image\sqrblit.gif ANNOBJECT_PUSHPIN

image\sqrblit.gif ANNOBJECT_STAMP

image\sqrblit.gif ANNOBJECT_TEXT

image\sqrblit.gif ANNOBJECT_TEXTPOINTER

Getting or setting this property for an annotation object other than ones listed above will set an error in the VCL Error and Error properties.

If this property is TRUE, then all tokens will be expanded.

For example, if you have an ANNOBJECT_BUTTON object that will expand text tokens, and #D is defined to be the current day of the week (ANNTOKEN_DATE_DAY_OF_WEEK), then entering #D for the text of this button will cause it to display the current day of the week when in design or run mode.

You must set the AnnFlags property before setting this property. Possible values for the Flags property, when used with this property are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

ANNFLAG_CHECKMENU

See Also

Elements:

AnnFlags property, AnnClearTextTokenTable method, AnnDeleteTextTokenTable method, AnnEnumerateTextToken method, AnnInsertTextTokenTable method

Topics:

Annotations: Object Manipulation