Supressing the text cursor

Discussions about the BBC BASIC language, with particular reference to BB4W and BBCSDL
TerryNewton
Posts: 2
Joined: Sat 15 Aug 2020, 03:27

Supressing the text cursor

Post by TerryNewton »

Hello,
Is there any way to suppress the blinking text cursor, particularly when in a graphics mode? For example, in the following program...

Code: Select all

      MODE 8
      WHILE 1
        GCOL RND(RND(16))-1
        PLOT 69,RND(1280)-1,RND(1024)-1
      ENDWHILE
...the cursor can still be seen blinking. For static images making the text foreground the same as the background would work, but I don't think that would do much good for this example. Also tried making the text viewport 0x0. Any ideas? Thanks.
Pete
Posts: 96
Joined: Wed 10 Apr 2019, 17:36

Re: Supressing the text cursor

Post by Pete »

Hi Terry,

OFF turns the cursor off, and ON turns it back on again.

From BBC Basic help:

OFF
A statement which hides the text cursor (which is normally a flashing underscore). The cursor can be switched on again with ON. OFF is equivalent to VDU 23,1,0;0;0;0;.

Enabling the text cursor
ON can also be used on its own to enable the text cursor (caret). ON is equivalent to VDU 23,1,1;0;0;0;.
TerryNewton
Posts: 2
Joined: Sat 15 Aug 2020, 03:27

Re: Supressing the text cursor

Post by TerryNewton »

Awesome! Thanks! that worked like a treat. Been up and down the help files and somehow I missed that.
RichardRussell

Re: Supressing the text cursor

Post by RichardRussell »

Pete wrote: Sat 15 Aug 2020, 07:06 OFF turns the cursor off, and ON turns it back on again.
VDU 5 also disables the caret (except in MODE 7). If you are operating in a graphics mode it is quite likely that any text you output will be written at graphics coordinates, so in that case the caret is disabled as a matter of course.