ITextRange.MoveEnd(TextRangeUnit, Int32) ITextRange.MoveEnd(TextRangeUnit, Int32) ITextRange.MoveEnd(TextRangeUnit, Int32) ITextRange.MoveEnd(TextRangeUnit, Int32) Method

Definition

Moves the end position of the text range.

public : int MoveEnd(TextRangeUnit unit, int count)
int32_t MoveEnd(TextRangeUnit unit, int32_t count) const;
public int MoveEnd(TextRangeUnit unit, Int32 count)
Public Function MoveEnd(unit As TextRangeUnit, count As Int32) As int

Parameters

unit
TextRangeUnit TextRangeUnit

The unit by which to move the end position of the text range. The default value is Character.

count
Int32 Int32

The number of unit s to move the end position of the text range. The default value is 1. If count is greater than zero, the end position moves forward, toward the end of the story. If count is less than zero, the end position move backward, toward the beginning of the story. If count is zero, the end position does not move.

Returns

int int

The actual number of unit s that the end position of the text range moved.

Remarks

If you move the end position of the text range so that it precedes the original start position, this method sets the start position to be equal to the new end position; that is, the text range becomes a degenerate range (insertion point).

This method moves the end position in a logical direction rather than a physical direction. That is, movement is toward the end or start of a story. Depending on the language, moving the end position toward the end of the story could result in the end position moving either left or right.

For more information, see the discussion in ITextRange and the Remarks section of ITextRange.Move.

See also