Using the 1.12 BlitzMax demo (trying the GUI before buying as Mark suggested), I can't seem to get SetGadgetColor, SetGadgetTextColor, or SetGadgetAlpha to do anything (with one exception under OS X). I know that in Windows the default is to use the system's style/color scheme, but is there no way to override that with these commands (like in Visual Basic, where system colors can be replaced with custom ones)?
The example below (assembled from those in the Help) doesn't change any gadget's color or alpha under Windows XP Pro SP 2. In Mac OS X 10.3.9, only the ListBox colors change, to blue text on a red background (which is what they should be).
IMHO, the alpha stuff isn't that important, but it'd be very useful to be able to change colors. Am I overlooking something, or is something wrong?
The example below (assembled from those in the Help) doesn't change any gadget's color or alpha under Windows XP Pro SP 2. In Mac OS X 10.3.9, only the ListBox colors change, to blue text on a red background (which is what they should be).
IMHO, the alpha stuff isn't that important, but it'd be very useful to be able to change colors. Am I overlooking something, or is something wrong?
Strict Local window:TGadget Local button:TGadget[5] window=CreateWindow("MaxGui Buttons",40,40,180,500,0,WINDOW_TITLEBAR) button[0]=CreateButton("Push Button",10,10,140,24,window,BUTTON_PUSH) button[1]=CreateButton("Checkbox Button",10,34,140,24,window,BUTTON_CHECKBOX) button[2]=CreateButton("Radio Button",10,58,140,24,window,BUTTON_RADIO) button[3]=CreateButton("OK",10,82,70,24,window,BUTTON_OK) button[4]=CreateButton("Cancel",84,82,70,24,window,BUTTON_CANCEL) For Local i = 0 To 4 SetGadgetColor button[i],255,0,0,True SetGadgetColor button[i],0,255,0,False SetGadgetTextColor button[i],0,0,255 SetGadgetAlpha button[i], 0.33 Next Local canvas:TGadget=CreateCanvas(10,120,133,100,window) SetGadgetColor canvas,255,0,0,True SetGadgetColor canvas,0,255,0,False SetGadgetTextColor canvas,0,0,255 SetGadgetAlpha canvas, 0.33 Local combobox:TGadget=CreateComboBox(10,240,120,22,window) AddGadgetItem combobox,"Short" AddGadgetItem combobox,"Medium" AddGadgetItem combobox,"Fat",True AddGadgetItem combobox,"Humungous" SetGadgetColor combobox,255,0,0,True SetGadgetColor combobox,0,255,0,False SetGadgetTextColor combobox,0,0,255 SetGadgetAlpha combobox, 0.33 Local label:TGadget=CreateLabel("A plain label",10,270,280,52,window) SetGadgetColor label,255,0,0,True SetGadgetColor label,0,255,0,False SetGadgetTextColor label,0,0,255 SetGadgetAlpha label, 0.33 Const ETIP$="Greate for lovers of rain, mushy peas and stomping beats.~r~nNew line..." Local listbox:TGadget=CreateListBox(4,300,100,50,window) AddGadgetItem listbox,"German" AddGadgetItem listbox,"England",False,-1,ETIP AddGadgetItem listbox,"French",False,-1,"tip - goes here","mystringobject" SetGadgetColor listbox,255,0,0,True SetGadgetColor listbox,0,255,0,False SetGadgetTextColor listbox,0,0,255 SetGadgetAlpha listbox, 0.33 Local slider:TGadget[3] ' standard vertical and horizontal scroll bars slider[0]=CreateSlider(10,360,16,100,window,SLIDER_VERTICAL) slider[1]=CreateSlider(30,360,100,16,window,SLIDER_HORIZONTAL) ' a horizontal trackbar slider[2]=CreateSlider(30,380,100,24,window,SLIDER_HORIZONTAL|SLIDER_TRACKBAR) For Local i = 0 To 2 SetGadgetColor slider[i],255,0,0,True SetGadgetColor slider[i],0,255,0,False SetGadgetTextColor slider[i],0,0,255 SetGadgetAlpha slider[i], 0.33 Next ' a row of vertical trackbars Local trackbar:TGadget[5] For Local i=0 To 4 trackbar[i]=CreateSlider(30+i*20,400,16,60,window,SLIDER_VERTICAL|SLIDER_TRACKBAR) SetGadgetColor trackbar[i],255,0,0,True SetGadgetColor trackbar[i],0,255,0,False SetGadgetTextColor trackbar[i],0,0,255 SetGadgetAlpha trackbar[i], 0.33 Next ' a single stepper Local stepper:TGadget stepper=CreateSlider(10,570,24,24,window,SLIDER_STEPPER) SetGadgetColor stepper,255,0,0,True SetGadgetColor stepper,0,255,0,False SetGadgetTextColor stepper,0,0,255 SetGadgetAlpha stepper, 0.33 SetSliderValue stepper,4 Print SliderValue(stepper) ' create an update timer CreateTimer 60 While WaitEvent() Select EventID() Case EVENT_TIMERTICK RedrawGadget canvas Case EVENT_GADGETPAINT Local g=CanvasGraphics(canvas) SetGraphics g SetOrigin 67,50 SetLineWidth 5 Cls Local t=MilliSecs() DrawLine 0,0,120*Cos(t),60*Sin(t) DrawLine 0,0,80*Cos(t/60),40*Sin(t/60) Flip Case EVENT_WINDOWCLOSE FreeGadget canvas End Case EVENT_APPTERMINATE End End Select Wend While True WaitEvent Select EventID() Case EVENT_WINDOWCLOSE End Case EVENT_TIMERTICK RedrawGadget canvas Case EVENT_GADGETPAINT Local g=CanvasGraphics(canvas) SetGraphics g SetOrigin 160,120 SetLineWidth 5 Cls Local t=MilliSecs() DrawLine 0,0,120*Cos(t),120*Sin(t) DrawLine 0,0,80*Cos(t/60),80*Sin(t/60) Flip Case EVENT_GADGETACTION Print "EVENT_GADGETACTION" End Select Wend