SelEnd - DfBaseRichEdit
Returns end of selection
Type: Function
Return Data Type: integer
Syntax
Function SelEnd Returns integer
Call Example
Get SelEnd to integerVariable
Description
Returns ending position of selection.
Returns the last character position inside the selection. If no text is selected, returns the current position of the caret.
The character position is the zero-based absolute position of the character in the control. The first position in the first line is always 0. If the first line in the control contains 20 characters, and the selected text is characters 5 through 10 of the second line, the return value of SelEnd will be 30.
Sample
This sample gets the beginning and ending position of the selected text of control oRichEdit1 and then displays the range to the user in a message box.
Procedure ShowSelectionRange
Integer iSelStart iSelEnd
Get SelStart of oRichEdit1 to iSelStart
Get SelEnd of oRichEdit1 to iSelEnd
Send Info_Box (string(iSelStart) + " to " + string(iSelEnd)) "Range of selected text"
End_Procedure
See Also
Return Value
Ending position of selection.