Yves1Fix Posted August 15, 2007 Share Posted August 15, 2007 GUICtrlSetColor don't work on some controls if I use Windows XP style appearance. In the following example, group and checkbox are not red. I don't have this problem with Windows Classic style appearance. Any help ? Thanks YvesOneFix CODE #include <GUIConstants.au3> GUICreate("Test color - Windows XP style appearance") GUICtrlCreateLabel("label (red)", 10, 20) GUICtrlSetColor(-1, 0xff0000) ; Red GUICtrlCreateGroup("group (not red?)", 10, 40, 150, 50) GUICtrlSetColor(-1, 0xff0000) ; Red GUICtrlCreateCheckbox("checkbox (not red?)", 15, 60, 140) GUICtrlSetColor(-1, 0xff0000) ; Red GUISetState () While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Link to comment Share on other sites More sharing options...
Sunaj Posted August 15, 2007 Share Posted August 15, 2007 Hey YvesOneFix,I tested out your example code, tried applying various Label/Static Styles (at times these things interact a bit strange.. just to to check).. finally tried under various themes. Final verdict: seems a no go :/Also states in the manual that: "Checkbox or Progress controls cannot be painted if the Windows XP style is used." so conclusion must be that this includes Group too.Guess you'll have to go manual-hack in case you need a weirdly colored AND themed Windows experience SunajGUICtrlSetColor don't work on some controls if I use Windows XP style appearance.In the following example, group and checkbox are not red.I don't have this problem with Windows Classic style appearance.Any help ?ThanksYvesOneFix [list=1][*]Generic way to detect full path to default browser, List/ListView Events Using GuiRegisterMsg (detect doubleclick and much more)[*]Using dllcall for full control over fileopendialog, Make DirMove act somewhat normally (by circumventing it...)[*]Avoid problems with "&" (chr(38)) in code, Change desktop maximized area/workspace (fx to make deskbar type app)[*]Change focus behavior when buttons are clicked to work closer to 'standard windows' app[*](Context) Menus With Timed Tooltips, Fast Loops & Operators in AU3[*]Clipboard UDF, A clipboard change notification udf[/list] Link to comment Share on other sites More sharing options...
smashly Posted August 15, 2007 Share Posted August 15, 2007 (edited) Cheats way to set the colour of text for the Checkbox and mimic Group ctrl to set text colour... #include <GUIConstants.au3> GUICreate("Test color - Windows XP style appearance") GUICtrlCreateLabel("checkbox (is red?)" , 32, 63, 110,20, $SS_SIMPLE) GUICtrlSetColor(-1, 0xff0000) ; Red GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateCheckbox("", 15, 60, 110, 20, $WS_CLIPSIBLINGS) GUICtrlCreateLabel("Group text", 15, 35, 55, 15, $SS_CENTER) GUICtrlSetColor(-1, 0xff0000) ; Red GUICtrlCreateButton("", 5, 40, 150, 50, $WS_CLIPSIBLINGS) GUICtrlSetColor(-1, 0); dummy the button txt color GUICtrlSetState(-1, $GUI_DISABLE) GUISetState () While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Cheers Edited August 15, 2007 by smashly Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now