rich
New Member
Posts: 3
|
Post by rich on Jan 10, 2020 21:38:40 GMT
What is the syntax for changing the background and font colors in JustBasic 2.0?
|
|
|
Post by B+ on Jan 10, 2020 21:59:11 GMT
From IDE Help see graphics > graphics commands > Color and Backcolor
|
|
rich
New Member
Posts: 3
|
Post by rich on Jan 11, 2020 1:56:12 GMT
Thanks!
|
|
rich
New Member
Posts: 3
|
Post by rich on Jan 12, 2020 20:57:03 GMT
Can you show me an example for defining the handle?
|
|
|
Post by tsh73 on Jan 12, 2020 22:02:59 GMT
nomainwin
WindowWidth = 392 WindowHeight = 170
UpperLeftX=int((DisplayWidth-WindowWidth)/2) UpperLeftY=int((DisplayHeight-WindowHeight)/2)
graphicbox #main.graphicbox1, 26, 16, 100, 100 graphicbox #main.graphicbox2, 142, 16, 100, 100 graphicbox #main.graphicbox3, 254, 16, 100, 100 open "untitled" for window as #main global colors$ colors$="red green blue"
for i = 1 to 3 'make a sting containing handle. Like, "#main.graphicbox1" handle$="#main.graphicbox";i 'use it print #handle$, "down; fill ";word$(colors$,i);"; flush" print #handle$, "when leftButtonUp click" 'set sub handler next
print #main, "trapclose [quit.main]"
print #main, "font ms_sans_serif 10"
wait
[quit.main] Close #main END
sub click handle$, x, y 'report handle passed notice "you've clicked ";handle$ 'get number from it, use it to report num = val(right$(handle$,1)) notice "you've clicked "; word$(colors$,num) 'use it to draw #handle$, "size 10; set "; x; " "; y end sub
|
|