Provides properties that let you manipulate the cursor.
Gives the cursor column position.
object.Column
Integer.
Read/write.
see example in Example.
Gives the row position of the cursor.
object.Row
Integer.
Read-only.
See example in Example.
Sets cursor visibility.
object.Visible[=Value As Boolean]
Boolean.
Read/write.
Value is an optional parameter that sets the cursor to visible (TRUE) or not visible (FALSE). By default it set to be TRUE.
See example in Example.
Moves the cursor to the row, column location inside of the current window.
object.MoveTo(
Row As Integer,
Column As Integer)
The row to move the cursor to.
The column to move the cursor to.
Boolean. Returns TRUE if successful; otherwise, FALSE.
This example generates a table of even numbers using all the properties and methods listed in the cursor object.
’Sample for displaying even numbers Win.Define(5,10,15,30) Win.title = "Even number table" Win.BackColor = WIN_BG_Cyan Win.Visible = True Win.TextWrap =TRUE ’Sets the cursor object Set cursor = Win.Cursor ’Disables cursor visibility in the text window cursor.visible =False ’Returns the current row position of the cursor i = cursor.row ’Returns the current column position of the cursor j = cursor.column ’Draws a vertical double line at the set cursor position i=1 Do While(i<10) j=4 Do while(j<20) ’Moves the cursor to the set row and column coordinates cursor.moveto(i,j) Win.Textout(win.linedrawchar(3)) j =j+4 loop i=i+1 loop ’Draws a horizontal double line at the set cursor position i=2 Do While(i<10) j =1 Do While(j<20) cursor.moveto(i,j) Win.Textout(win.linedrawchar(1)) j =j+1 loop i=i+2 loop ’draws a horizontal cross to make a table at the set cursor position i=2 Do While(i<10) j =4 Do While(j<20) cursor.moveto(i,j) Win.Textout(win.linedrawchar(39)) j=j+4 loop i=i+2 loop ’Displays the number at the set cursor position x=4 i=1 Do While(i<10) j=2 Do While(j<20) cursor.moveto(i,j) Win.Textout(Cstr(x)) j=j+4 x=x+2 loop i=i+2 loop Wait 2000 Win.Close()