Extensibility > Graphics Builder Automation Interface > Text Property Functions > AttributeTextStyle

AttributeTextStyle

Sets a specific text style, or retrieves the current text style setting.

Syntax

AttributeTextStyle(TextStyle)

TextStyle:

A value depicting text style:

You can superimpose styles by adding the above values.

Return Value

If retrieving the current text style, a value between 0 and 8 depicting the applied style. If applying a text style, 0 (zero) if successful. In both cases, an error is returned if unsuccessful. If values are out of range on writing to the attribute, the function will exit and report the error E_INVALIDARG. If there is no active text object, these functions throw an exception with a return value of E_HANDLE.

Note: For details on handling return and error values, see Error Handling.

Related Functions

AttributeText, AttributeTextJustification, AttributeTextFont, AttributeTextFontSize, AttributeTextColour

Example

' Sets the normal text style
GraphicsBuilder.AttributeTextStyle = 0

' Retrieves the current text style setting
MyVariable = GraphicsBuilder.AttributeTextStyle

Note: This function is implemented in the C++ environment as two separate functions: put_AttributeTextStyle applies a style to the currently selected text, and get_AttributeTextStyle retrieves the current text style setting.

Published June 2018