RichEditTextRange.EndOf(TextRangeUnit, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Moves or extends the text range to the end of the nearest specified text unit. The text range is moved or extended forward in the document.
public:
virtual int EndOf(TextRangeUnit unit, bool extend) = EndOf;
int EndOf(TextRangeUnit const& unit, bool const& extend);
public int EndOf(TextRangeUnit unit, bool extend);
function endOf(unit, extend)
Public Function EndOf (unit As TextRangeUnit, extend As Boolean) As Integer
Parameters
- unit
- TextRangeUnit
The unit by which to move the end position of the text range.
- extend
-
Boolean
bool
true to extend the text range by moving just the end position of the range to the end of the specified unit. false to move both ends of the text range to the end of the specified unit. The default is false.
Returns
int
The number of character positions that the range was moved or extended, plus 1 if the text range collapsed to the start of the range. If the text range includes the final carriage return (CR) at the end of the story, and extend is false, the return value is set to –1 to indicate that the collapse occurred before the end of the range. This is because an insertion point cannot exist beyond the final CR.