Jump to content



Recommended Posts

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()
        Case $msg = $GUI_EVENT_CLOSE
        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.')

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!

Link to comment
Share on other sites

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)
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 by Holger
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...