Visual Basic: RichTextBox Control

SelColor Property

See Also    Example    Applies To

Returns or sets a value that determines the color of text in the RichTextBox control. Not available at design time.

Syntax

object.SelColor [= color]

The SelColor property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
color A value that specifies a color, as described in Settings.

Settings

The settings for color are:

Setting Description
Null The text contains a mixture of different color settings.
RGB colors Colors specified in code with the RGB or QBColor functions.
System Colors specified with the system color constants in the Visual Basic object library in the Object Browser. The color of the text then matches user selections for the specified constant in the Windows Control Panel.

Remarks

If there is no text selected in the RichTextBox control, setting this property determines the color of all new text entered at the current insertion point.