I always search for the answer before asking questions but only found...
SetGadgetAttribute
But could not find the attribute constant required to set the background color anywhere.
So forgive me for asking, but could somebody tell me the proper constant? Thanks.
Setting Canvas background color
-
- User
- Posts: 77
- Joined: Thu Jun 20, 2013 5:41 am
- Location: Springerville AZ USA
Re: Setting Canvas background color
The canvas gadget doesn't have a background attribute, you can draw it yourself with a Box().ken_anthony wrote:I always search for the answer before asking questions but only found...
SetGadgetAttribute
But could not find the attribute constant required to set the background color anywhere.
So forgive me for asking, but could somebody tell me the proper constant? Thanks.
Re: Setting Canvas background color
Background Color of a Canvas ? with SetGadgetAttribute ?
Never saw that. Normally its like
Never saw that. Normally its like
Code: Select all
StartDrawing(CanvasOutput(Gadget))
Box(0, 0, OutputWidth(), OutputHeight(), Color)
StopDrawing()
-
- User
- Posts: 77
- Joined: Thu Jun 20, 2013 5:41 am
- Location: Springerville AZ USA
Re: Setting Canvas background color
That worked. Well, after I figured out why it wasn't working since I resized from zero to the parent height and width (it's always something, isn't it?)
Thanks a huge bunch.
ken
Thanks a huge bunch.
ken
Re: Setting Canvas background color
Your welcome. 

Re: Setting Canvas background color
> SetGadgetAttribute()
The command for setting gadget colors is SetGadgetColor().
When you look up this command in the Help manual, you'll
see that the canvas gadget doesn't support this command.
Also, when you look up the canvas gadget in the Help manual,
you'll see a list of attibutes (constants) that it supports. There
is no attribute for setting the color, for this or any other gadget.
The command for setting gadget colors is SetGadgetColor().
When you look up this command in the Help manual, you'll
see that the canvas gadget doesn't support this command.
Also, when you look up the canvas gadget in the Help manual,
you'll see a list of attibutes (constants) that it supports. There
is no attribute for setting the color, for this or any other gadget.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Re: Setting Canvas background color
a Canvas ist a thing to draw on , nearly like in real life, where you can buy colored canvases. 

사십 둘 .
-
- User
- Posts: 77
- Joined: Thu Jun 20, 2013 5:41 am
- Location: Springerville AZ USA
Re: Setting Canvas background color
Thank you all. I'm very impressed by the responses I've received. You are certainly a good group of people.