TextT.getCaretOffset

Gets the offset of the position of the caret (cursor).

template TextT(TStruct)
int
getCaretOffset
()

Return Value

Type: int

the character offset of the position of the caret or -1 if the caret is not located inside the element or in the case of any other failure.