This article describes how to hide the cursor when using an ACCEPT OMITTED statement.
The cursor may be hidden by using the runtime configuration variable: CURSOR_MODE
This variable can assume one of these values:
1 (always visible)
2 (always invisible)
3 (invisible except during ACCEPT statements, then visible)
The default value is 3.
Note that this variable has a global effect over the whole application, so it is advisable to set it programmatically when needed.
The program sample below shows how to do this and how to restore the default value.
decimal-point is comma.
77 default-font handle of font.
77 h-wind handle of window.
display standard graphical window lines 30 size 80
height-in-cells width-in-cells color 65793
title "Hide the cursor" auto-minimize handle in h-wind
no wrap control font default-font.
display "This sample shows how to hide the blinking cursor --"
- "->" line 4
SET ENVIRONMENT "CURSOR_MODE" TO 2
display "Now the cursor is here but it's not visible --->"
display "Resetting CURSOR_MODE to 3 makes the cursor appear"
- "r again --->" line 8
SET ENVIRONMENT "CURSOR_MODE" TO 3
ACCEPT OMITTED line 8 col 65
display "Bye!" line 10
Incident Number: 2281441