Hello everyone!
When I try to reset a panel to its original state, it gets black instead of showing the original system color. - Is this a glitch of some sort? (OS: Win7, 64-Bit)
Quick and dirty example code:
Import MaxGui.Drivers
Strict
Local window:TGadget
Local panel:TGadget
Local red,green,blue
Local but:TGadget
window=CreateWindow("RequestColor",40,40,320,240,Null,WINDOW_TITLEBAR)
panel=CreatePanel(20,20,32,32,window,PANEL_ACTIVE|PANEL_SUNKEN)
but=CreateButton("Reset Color",140,10,120,30,window,BUTTON_OK)
While True
WaitEvent
Select EventID()
Case EVENT_WINDOWCLOSE
End
Case EVENT_MOUSEDOWN
If RequestColor(red,green,blue)
red=RequestedRed()
green=RequestedGreen()
blue=RequestedBlue()
SetGadgetColor panel,red,green,blue
EndIf
Case EVENT_GADGETACTION
SetGadgetColor panel,-1,-1,-1
SetGadgetText but, "Done!"
End Select
Wend
Thanks Grisu
|