Help Center

CRichEditCtx.TextOffsetmethod

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

Windowsmethoddocumented

Syntax

PRIVATE PROPERTY CRichEditCtx.TextOffset () AS LONG

Parameters

NameDescription
offsetCharacter offset, in pixels, from the baseline. If the value of this member is positive, the character is a superscript; if it is negative, the character is a subscript.

Return value

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

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

Description

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

Remarks

This property converts the pixels to twips internally.

To select text programatically, use the SetSel method.

Example

(GET) PROPERTY TextOffset () AS LONG (SET) PROPERTY TextOffset (BYVAL offset AS LONG)

Reference

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