Not seeing red.

Discussions about the Liberty BASIC language, with particular reference to LB Booster
Tasp
Posts: 16
Joined: Sun May 31, 2020 4:51 pm

Not seeing red.

Post by Tasp »

This should create a red background in the graphicbox, but it doesn't?

I mean colour is spelt wrong, but this should work?

Code: Select all

GRAPHICBOX #g.1, 1,1, 200, 200
OPEN "WINDOW" FOR WINDOW AS #g

#g.1, "BACKCOLOR RED"

END
guest
Site Admin
Posts: 197
Joined: Tue Apr 03, 2018 1:34 pm

Re: Not seeing red.

Post by guest »

Tasp wrote: Thu Mar 04, 2021 5:37 pm this should work?
No. I would again refer you to the LB Help manual: 'print #handle, "backcolor COLOR": This command sets the color used when drawn figures are filled with a color'. The command doesn't do any drawing itself, as you seem to expect, it sets the fill colour of a subsequently drawn figure.

So you could for example do this:

Code: Select all

GRAPHICBOX #g.1, 1,1, 200, 200
OPEN "WINDOW" FOR WINDOW AS #g

#g.1, "BACKCOLOR RED"
#g.1, "DOWN; BOXFILLED 200 200"

WAIT
Tasp
Posts: 16
Joined: Sun May 31, 2020 4:51 pm

Re: Not seeing red.

Post by Tasp »

I swear I have the helpfile tabs open! Hangs head in shame.
I clearly am looking but not reading.
I was actually just looking for fill.

Cheers Richard