I dont' know if this is a 'maxgui bug' or a standard behaviour/limit of the Win32 GUI platform. But, just create a button, change its color (text or background doesnt' matter) and try to set a pixmap on it. I tried to set the pixmap BEFORE and AFTER the change of color, but nothing: the pixmap is ignored (no icon is drawn) while the button has the color choosed.
Same behaviour on FLTK...however I didn't check the source at the moment
Import maxgui.drivers
Local window:tgadget=CreateWindow("Test",10,10,200,200,,WINDOW_TITLEBAR|WINDOW_CENTER)
Local label:tgadget=CreateButton("2",10,10,32,32,window)
Local pix:TPixmap=LoadPixmap("icon.png")
SetGadgetColor label,50,100,100
SetGadgetPixmap label,pix',GADGETPIXMAP_ICON
While True
WaitEvent
Select EventID()
Case EVENT_WINDOWCLOSE
End
End Select
Wend
|