pdaughe Posted April 14, 2007 Posted April 14, 2007 Here is the example from the help file, modified only to include a GUICTRLSETCOLOR in an attempt to change the color of the radio control text. What's surprising it that I searched the forums and this apparently hasn't been reported. Am I missing something? #include <GUIConstants.au3> #include <Constants.au3> GUICreate("My GUI radio") ; will create a dialog box that when displayed is centered $radio1 = GUICtrlCreateRadio ("Radio 1", 10, 10, 120, 20) $radio2 = GUICtrlCreateRadio ("Radio 2", 10, 40, 120, 20) GUICtrlSetColor ($radio2, $Color_White) ;--------------------- included statement GUICtrlSetState ($radio2, $GUI_CHECKED) GUISetState () ; will display an dialog box with 1 checkbox ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED MsgBox(64, 'Info:', 'You clicked the Radio 1 and it is Checked.') Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED MsgBox(64, 'Info:', 'You clicked on Radio 2 and it is Checked.') EndSelect Wend I just downloaded v3.2.3.2 and it behaves the same as it did in the production version. By the way, v3.2.3.2 seems notably faster when switching/activating windows -- could be my imagination, but something has to be A LOT faster for it to be visually noticeable. Great job developers!
pdaughe Posted April 16, 2007 Author Posted April 16, 2007 In addition, it seems that the text of a checkbox cannot be colored. Is this true for others?
pdaughe Posted April 17, 2007 Author Posted April 17, 2007 I work around is to just create a label following a very narrow radio control - does it work for anyone else?
Holger Posted April 17, 2007 Posted April 17, 2007 (edited) That is maybe again cause if you use a XP-Theme (non-classic). Just use a function like: Func SetThemeAppProperties($nFlags) DllCall("uxtheme.dll", "none", "SetThemeAppProperties", _ "int", $nFlags) EndFunc oÝ÷ Ú)ò¢êìr¸©µ.q©ÜjYméí+ºw-ây·¢·æx-á"X¤y«¢+Ø(¸¸¸)MÑQ¡µÁÁAɽÁÉÑ¥Ì Ä¤()U% ÉÑ ÅÕ½Ðí5äU$É¥¼ÅÕ½Ðì¤(¸¸¸ Additional info to SetThemeProperties-value: 0 = don't allow visual styles for all controls/nonclient areas 1 = allow for nonclient areas (like border, etc) 2 = allow for normal controls 4 = allow for web contents. These values can be cominbed, so if you use a value 3 you will have the same results as before - no color for radio, so 1 is a good value so you can still have the XP theme style window. Edited April 17, 2007 by Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
pdaughe Posted April 18, 2007 Author Posted April 18, 2007 Thank you Holger, very much, for responding -- I was feeling all alone on this forum! You not only responded, but gave a solution that works, just like you suggested. Thanks again. Paul
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