Cicode Programming Reference > Cicode Function Categories > Display Functions > DspStr

DspStr

Displays a string at a specified AN.

Note: This function was originally intended for V3.xx and V4.xx animations, and was superseded in later releases with text objects.

Syntax

DspStr(nAN, sFont, sText [, iLength] [, iAlignMode] [, iLengthMode] [, bTooltip])

nAN:

The AN where the text will be displayed.

sFont:

The name of the font that is used to display the text. The Font Name needs to be defined in the Fonts database. If the font is not found, the default font is used.

sText:

The text to display.

iLength:

Length of the text to display, either in characters or pixels depending on Mode (default -1, no truncation)

iAlignMode:

The alignment of the text string:

0 - Left Justified (default)

1 - Right Justified.

2 - Center Justified.

iLengthMode:

The length mode of the text string:

0 - Length as pixels truncated (default)

1 - Length as pixels truncated with ellipsis

2 - Length interpreted as characters.

bTooltip:

Determines if the original text is provided as tool tip when the displayed text becomes truncated.

0 - Tool tip is not available (default).

1 - Tool tip is available.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

DspText

Example

DspStr(25,"RedFont","Display this text");
/* Displays "Display this text" using "RedFont" at AN25. "RedFont" needs to be defined in the Fonts database. */

See Also

Display Functions

Published June 2018