Background Colour of Windows in MaxGUI?

BlitzMax Forums/BlitzMax Beginners Area/Background Colour of Windows in MaxGUI?

3Ddoofus(Posted 2006) [#1]
Hi All,
Sorry if this has already been covered, did a search of the forum but didn't turn anything up.
Is it possible to change the background colour of a window created in MaxGUI. It defaults to the grey colour and I'd like to change it to white.
Many thanks in advance,
3Ddoofus


CS_TBL(Posted 2006) [#2]
This window is grey because your OS is grey and just like the other gadgets: it's a window of the OS.

A solution: pick a spare day and make your own window gadget, which you can completely customize, gfx-wise and feature-wise.

Another more simple solution: put a panel on the window-form, and give the panel a color with SetPanelcolor mypanel,r,g,b. This then only changes the form tho, not the outer parts of a window.
You use this panel as parent for your gadgets then..


3Ddoofus(Posted 2006) [#3]
Thanks for the quick reply.
I've tried the setpanelcolor command which worked but seemed to stop my other panels which were in front of it from working. Will making it a parent make them work again?


CS_TBL(Posted 2006) [#4]
So you already had panels/gadgets with the window as parent? Then make this new Panel the parent for all. (As in: first make this new panel, then proceed with the rest of the app)

local window:TGadget=CreateWindow(..)

local windowpanel:TGadget=CreatePanel(0,0,clientwidth(window),clientheight(window),window)

' list of your own application stuff, buttons, panels, etc.

local MyGadget:TGadget=CreateWhatever(.. .. ,windowpanel)
local MyGadget2:TGadget=CreateWhatever(.. .. ,windowpanel)

etc.


3Ddoofus(Posted 2006) [#5]
Yep, I had the original window, panels and buttons set up. Just wanted to make the windows background white
I'll give your suggestion a go.
Thanks again.


3Ddoofus(Posted 2006) [#6]
That worked a treat, thanks