Jump to content

Making Checkbox Text White?


Swift
 Share

Recommended Posts

No, that was what I was showing you so it you can see that it doesn't change colors, I want it:

Text: White

BK: Black

GUICtrlSetColor(-1, 0xFFFFFF) ; Doesn't make it white

GUICtrlSetBkColor(-1, 0x000000) ; Makes it black...

So It's invisable...

Link to comment
Share on other sites

Well I dont know why it don't work but one possible solution would be to not have any text on the checkbox and put a ordinary label beside it

Edit: just saw these in the beta, GUICtrlSetDefColor() & GUICtrlSetDefBkColor() I dont have beta installed so I dont know what they do but they sound interesting

Edited by AdmiralAlkex
Link to comment
Share on other sites

I cant use beta for this though. It is all in .10 Release. I can't change it...And the only problem with a no text checkbox, is that when you put your mouse over the 'checkbox label' it highlights the checkbox, if there is no 'checkbox label' it wont do that, not even a real label would..

Link to comment
Share on other sites

Maybe...

#include <GUIConstants.au3>
Dim $XS_n

GUICreate("My GUI Checkbox")  ; will create a dialog box that when displayed is centered
GUISetBkColor(0x000000)
If XPStyle(1) Then MsgBox(0,0,"on", 2)
$checkCN = GUICtrlCreateRadio("Radio 1", 10, 10, 120, 15)
GUICtrlSetColor($checkCN, 0xFF0000)
GUICtrlSetBkColor($checkCN, 0x000000);0xFFFFFF)
If XPStyle(0) Then MsgBox(0,0,"off", 2)
GUISetState()       ; will display an  dialog box with 1 checkbox

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

Func XPStyle($OnOff = 1)   
    If $OnOff And StringInStr(@OSTYPE, "WIN32_NT") Then
        $XS_n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties")
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)
        Return 1
    ElseIf StringInStr(@OSTYPE, "WIN32_NT") And IsArray($XS_n) Then
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $XS_n[0])
        $XS_n = ""
        Return 1
    EndIf
    Return 0
EndFunc   ;==>XPStyle

there is this and more in Autoit Wrappers

http://www.autoitscript.com/forum/index.ph...st&p=133769

8)

NEWHeader1.png

Link to comment
Share on other sites

I don't get it, it shows a message box saying: on

2 seconds later: Off.

then a gui appears? So...? What exactly does this do...?

Have a closer look.

XPStyle(1) turns off XP visual styles

then the checkbox is created without the XP styles so setting the colour and background work. Valuater made the font red but you can change that obviously.

XPStyle(0) turns XP styles back to what they were before and anything created now will have the usual visual styles.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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
 Share

  • Recently Browsing   0 members

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