Skip to main content
Version: Next

ST SET OPTIONS

ST SET OPTIONS ( {* ;} object ; option ; value {; option2 ; value2 ; ... ; optionN ; valueN} )

ParameterTypeDescription
*OperatorIf specified, object is an object name (string)
If omitted, object is a field or variable
objectanyObject name (if * is specified) or
Field or variable (if * is omitted)
optionIntegerOption to set
valueIntegerNew value of option

This command is not thread-safe, it cannot be used in preemptive code.

Description

The ST SET OPTIONS command modifies one or more operating options for the styled text field or variable designated by the object parameter.

Passing the optional * parameter indicates that the object parameter is an object name (string). If you do not pass this parameter, it indicates that the object parameter is a field or variable. In this case, you pass a field or variable reference instead of a string (field or variable object only).

Pass the code of the option to modify in option and its new value in value.

The option parameter supports the following constant found in the "Multistyle Text" theme:

ConstantTypeValueComment
ST Expressions display modeInteger1The value parameter can contain ST Values or ST References

In the value parameter, you can pass one of the following constants:

ConstantTypeValueComment
ST ReferencesInteger1Display source strings of expressions
ST ValuesInteger0Display computed values of expressions

Display of values:

Display of expressions:

Example

The following code lets you switch the display mode of the area:

 ST GET OPTIONS(*;"StyledText_t";ST Expressions display mode;$exprValue)
 If($exprValue=1)
    ST SET OPTIONS(*;"StyledText_t";ST Expressions display mode;ST Values)
 Else
    ST SET OPTIONS(*;"StyledText_t";ST Expressions display mode;ST References)
 End if

See also

ST GET OPTIONS