Applies a specific justification setting to selected text, or retrieves the current text justification value.
Syntax
AttributeTextJustification(TextJustification)
TextJustification:
A value depicting the type of justification used:
Return Value
If retrieving the current text justification, a value between 0 and 2 depicting the type of justification used. If applying justification, 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, AttributeTextStyle, AttributeTextFont, AttributeTextFontSize, AttributeTextColour
Example
' Applies right justification to the selected text
GraphicsBuilder.AttributeTextJustification = 1
' Retrieves the current text justification value
MyVariable = GraphicsBuilder.AttributeTextJustification
Note: This function is implemented in the
C++ environment as two separate functions: put_AttributeTextJustification
applies
justification to the currently selected text, and get_AttributeTextJustification
retrieves the
current justification setting.