Help Center

CTextRange2.SetIndexmethod

Changes this range to the specified unit of the story.

Windowsmethoddocumented

Syntax

FUNCTION SetIndex (BYVAL Unit AS LONG, BYVAL Index AS LONG, BYVAl Extend AS LONG = 0) AS LONG

Parameters

NameDescription
UnitUnit used to index the range. For a list of Unit values, see the table below.
IndexIndex for the Unit. This range is relocated to the Unit that has this index number. If positive, the numbering of Units begins at the start of the story and proceeds forward. If negative, the numbering begins at the end of the story and proceeds backward. The start of the story corresponds to an Index of 1 for all units that exist, and the last unit in the story corresponds to an Index of -1.
ExtendFlag that indicates the extent of the range. If zero (the default), the range is collapsed to an insertion point at the start position of the specified Unit. If nonzero, the range is set to the entire Unit.

Description

Changes this range to the specified unit of the story.

Reference

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