SetTextColor

Description

Sets the color of selected text in a RichTextEdit control.

Applies to

RichTextEdit controls

Syntax

rtename.SetTextColor ( colornumber )

Argument

Description

rtename

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

colornumber

A long specifying the color of the selected text


Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs.

Usage

For more information about calculating color values, see RGB.

Examples

This example sets the selected text in RichTextEdit rte_1 to dark red:

rte_1.SetTextColor(RGB(100, 0, 0))

See also

GetTextColor

RGB

SetTextStyle