Jaa


ITextRange.StartPosition Property

Definition

Gets or sets the start position of the text range.

public:
 property int StartPosition { int get(); void set(int value); };
int StartPosition();

void StartPosition(int value);
public int StartPosition { get; set; }
var int32 = iTextRange.startPosition;
iTextRange.startPosition = int32;
Public Property StartPosition As Integer

Property Value

Int32

int

The character position to set as the start position of the text range.

Remarks

If the start position is greater than the end position, this method sets the end position to be equal to the start position, resulting in a degenerate range (insertion point).

If this text range represents the active selection, the start position becomes the active end of the selection and is scrolled into view if the display is not frozen.

The following example shows how to convert a nondegenerate range into a degenerate range. range.End = range.Start

Similarly, the following example converts the text range into a degenerate range at the end of the range. range.Start = range.End

The following example adds 1 to end of the text range, if the range is not at the end of the story. range.End = range.End + 1

The preceding example also makes the end of the text range the active end, and can turn a degenerate range into a nondegenerate one.

Applies to