Help Center

CRichEditCtx.TextColormethod

Gets/sets the text color of the selected text or the word under the cursor.

Windowsmethoddocumented

Syntax

PRIVATE PROPERTY CRichEditCtx.TextColor () AS COLORREF

Parameters

NameDescription
crTxtColorThe new text color. Use the macro RGB (BGR in FreeBasic), e.g. BGR(255,0,0).

Return value

(GET) The color of the selected text or the word under the cursor if there is not selection.

(SET) A boolean true (-1) or false (0).

Description

Gets/sets the color of the selected text or the word under the cursor.

Remarks

To select text programatically, use the SetSel method.

Example

(GET) PROPERTY TextColor () AS COLORREF (SET) PROPERTY TextColor (BYVAL crTxtColor AS COLORREF)

Reference

  • Defined in AfxNova/CRichEditCtx.inc:3903
  • Documented in Windows/WIndows Controls/RichEdit/CRichEditCtx Class.md
  • Topic: CRichEditCtx Class