MoveCell Method (Cursor)

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

Description

Move of nOffset tabulation cells - up or down if bVertical is true, right or left if bVertical is false. It does not do anything if the cursor is not inside a tabulation.

Returns 0 if successful, otherwise it returns the number of positions NOT moved yet (e.g. if the cursor is one cell before the end of the table, a Move(3) call will move the cursor to the left by 1 cell - to the end of the table - and return 2 = 3 - 1).

See also Move Method and MoveWord Method.

Syntax

dim NotMoved as Long = object.MoveCell(bVertical, nOffset)

object

Required. Object name, returned by Text.GetCursor(...).

nOffset

Integer. If positive, number of cells to move right; if negative, number of cells to move left

Example

Moves the cursor to the tabulation cell above and to the right:

dim objCur = Text.GetCursor(modeSame,cposCursor,True)

If objCur.MoveCell(True,-1) = 0 Then

  If objCur.MoveCell(False,1) = 0 Then

    Text.CursorTo (objCur)

  End If

End If

For the meaning of the standard constants see Constants related to Cursor and TxtPosDesc object.