GetCursor Method

Build 1501 on 14/Nov/2017  This topic last edited on: 23/Mar/2016, at 12:19

Description

Returns a Cursor object referring to a specific position inside the text

See also Cursor object.

Syntax

dim oCursor as Cursor = Text.GetCursor (nMode,nPos,bLimit)

nMode

Mode of the returned cursor: -1=same as current editing mode, 0=WYSIWYG, 1=source mode with commands visible, 2=source mode with commands invisible

nPos

Position of the returned cursor: 0=text begin, 1=text end, 2=current cursor position, 3=begin selection, 4=end selection

bLimit

true to limit the cursor range to the part of the text on the current page, false to have no limits (valid only in Fred)

Return value

Error code

Context

Text designer commands

Example

Click to toggle expandSwap the characters after the cursor
Click to toggle expandIdentify a special character on the position of the cursor for which Text.GetTxt returns an empty string

 

For the meaning of the standard constants (eg. modeSame, cPosCursor) etc, see Ted constants related to Cursor and TxtPosDesc object.

See also

EditPasteTo Function, CursorTo Function, InsTedTextAt Function, EditCopyRange Function, DelRange Function.