Command SET CURSOR Foundation

Turns screen cursor on or off.

Syntax
SET CURSOR ON | off | <lToggle>
Scope
process-wide
Parameters
ON
The option ON turns the cursor on.
OFF
The option OFF turns the cursor off.
<lToggle>
Instead of the options ON | OFF, a logical expression <lToggle> can be specified which must appear in parentheses. The value .T. (true) corresponds to the option ON, .F. (false) corresponds to the value OFF.
Description

The screen command SET CURSOR turns the cursor on or off. When it is turned off, the cursor position continues to be updated after output on the screen and the functions Row() and Col() give the current position of the cursor. The cursor is just not visible. It makes sense to display the cursor only when data input by the user is to occur via GET or MemoEdit(). During selection routines like AChoice() or MENU TO, the cursor should be turned off.

The functional equivalent of the command SET CURSOR is the function SetCursor(), which can specify the shape of the screen cursor as well as its visibility.

By default the cursor setting is ON. This is not true if the application is linked with the /PM:PM flag. Then the default setting is OFF.

Examples
SET CURSOR
// The example shows a typical use for SET CURSOR. The 
// cursor is turned on before the command READ, and after 
// termination of input, it is turned off again. 

PROCEDURE Main 
   USE Address NEW 

   @ 5,15  SAY  " Last Name:"  GET LNAME 
   @ 6,15  SAY  "First Name:"  GET FNAME 

   SET CURSOR ON 

   READ 

   SET CURSOR (.F.) 

   USE 
RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.