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

AttributeTextOffColourEx

Applies the "off" color to the selected text, or retrieves the current font color setting.

Syntax

AttributeTextOffColourEx(TextColour)

TextColour:

An RGB value.

Return Value

If retrieving the current font color, an RGB value. If applying a particular font color, 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 exits and reports 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, AttributeTextStyle, AttributeTextJustification, AttributeTextFont, AttributeTextFontSize

Example

' Applies a color to the selected text
GraphicsBuilder.AttributeTextOffColourEx = &hFF0000

`Retrieves the current font color setting
MyVariable = GraphicsBuilder.AttributeTextOffColourEx

This function is implemented in the C++ environment as two separate functions: put_AttributeTextOffColourEx applies a color to the currently selected text, and get_AttributeTextOffColourEx retrieves the current text color.

Published June 2018