SETTEXTCURSOR

Graphics Function: Sets the height and width of the text cursor (the caret) for the window in focus.

Module: USE DFLIB

Syntax

result = SETTEXTCURSOR (newcursor)

newcursor
(Input) INTEGER(2). The leftmost 8 bits specify the width of the cursor, and the rightmost 8 bits specify the height of the cursor. These dimensions can range from 1 to 8, and represent a fraction of the current character cell size. For example:


If either of these dimensions is outside the range 1 to 8, it is forced to 8.

Results:

The result is of type INTEGER(2); it is the previous text cursor value in the same format as newcursor.


Note: After calling SETTEXTCURSOR, you must call DISPLAYCURSOR($GCURSORON) to actually see the cursor.

Compatibility

STANDARD GRAPHICS QUICKWIN GRAPHICS LIB

See Also: DISPLAYCURSOR

Example

use dflib
integer(2) oldcur
integer(2) istat
type(rccoord) rc
open(10,file='user')
istat  = displaycursor($GCURSORON)
write(10,*) 'Text cursor is now character cell size, the default.'
read(10,*)
write(10,*) 'Setting text cursor to wide and low.'
oldcur = settextcursor(#0801)
istat  = displaycursor($GCURSORON)
read(10,*)
write(10,*) 'Setting text cursor to high and narrow.'
oldcur = settextcursor(#0108)
istat  = displaycursor($GCURSORON)
read(10,*)
write(10,*) 'Setting text cursor to a dot.'
oldcur = settextcursor(#0101)
istat  = displaycursor($GCURSORON)
read(10,*)
end