4D v13

WR SET CURSOR POSITION

Home

 
4D Write v13
WR SET CURSOR POSITION

WR SET CURSOR POSITION 


 

WR SET CURSOR POSITION ( area ; page ; column ; row | level ; position ) 
Parameter Type   Description
area  Longint in 4D Write area
page  Longint in Page number
column  Longint in Column number
row | level   Longint in Line number
position  Longint in Horizontal position of the cursor in the line

The WR SET CURSOR POSITION command moves the insertion point to a new position specified by page, column , line and position.

  • page: The value for page must be between the first and the last page numbers of the document. The page number must take into account the page numbering as it was defined in the preferences dialog.
  • column: The value for column must be between 1 and the total number of columns.
  • line: The value for line must be contained between 1 and the total number of lines of the column (or page, if there is only one column).
  • position: This value must be contained between 1 and the total number characters in the line. To move the insertion point to the first position in the line, set position to 1.

If you want to place the cursor in an area other than the body area, you need to use the WR SET FRAME command before using the WR SET CURSOR POSITION command.

Example  

You want to move the insertion point to the beginning of the 10th line of the 4th page:

  `Making sure that we are in the body area of the document
 If(WR Get frame(Area)#0)
  `Otherwise, moving to the body area
    WR SET FRAME(Area;wr text frame)
 End if
  `Moving the cursor
 WR SET CURSOR POSITION(Area;10;1;10;1)
  `Scrolling area to display the insertion point
 WR SCROLL TO SELECTION(Area)

 
PROPERTIES 

Product: 4D
Theme: WR Area Options
Number: 89483

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D Write 6.5

 
SEE ALSO 

WR GET CURSOR POSITION
WR SET FRAME