GetTextColor

Description

Obtains the color of selected text in a RichTextEdit control.

Applies to

RichTextEdit controls

Syntax

rtename.GetTextColor ( )

Argument

Description

rtename

The name of the RichTextEdit control in which you want to find out the color of selected text

Returns

Long. Returns the long value that specifies the color of the currently selected text. If text of different colors is selected, GetTextColor returns the color of the first selected character. GetTextColor returns -1 if an error occurs.

Examples

Example 1

This example stores a long representing the color of the selected text in rte_1:

long ll_color

ll_color = rte_1.GetTextColor()

See also