Obtains the color of selected text in a RichTextEdit control.
RichTextEdit controls
rtename.GetTextColor ( )
Argument |
Description |
---|---|
rtename |
The name of the RichTextEdit control in which you want to find out the color of selected text |
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.
This example stores a long representing the color of the selected text in rte_1:
long ll_color
ll_color = rte_1.GetTextColor()