Description
Returns true if the cursor position is before the position of objCursor (another Cursor object) in the text.
See also IsEqual Method.
Syntax
dim bValue as Boolean = object.IsBefore (objCursor) |
object
Required. Object name, returned by Text.GetCursor(...).
objCursor
Required. Another object name, returned by Text.GetCursor(...).
Example
The below example returns TRUE because the virtual cursor of the objFrom object is moved for two characters on the right, before the objFrom was created by duplicating from the objFrom object (since it was duplicated on the same position where objFrom was).
Dim objFrom = Text.GetCursor(modeSame,cposCursor,True)
objFrom.Move (2)
Dim objTo = objFrom.Duplicate
msgbox (Text.GetCursor(modeSame,cposCursor,True).IsBefore (objTo))
For the meaning of the standard constants see Constants related to Cursor and TxtPosDesc object.