Jump to content
Sign in to follow this  
Swimming_Bird

Change Checkbox Control Text Color

Recommended Posts

Swimming_Bird

I cant figure out how to change the color of a checkbox control's text. Is this even possible?

Share this post


Link to post
Share on other sites
Swimming_Bird

i've tried that it didnt work.

i was only able to set the background color.

this leave the color as black

#include <GUIConstants.au3>

GUICreate("My GUI Checkbox")  ; will create a dialog box that when displayed is centered

$checkCN = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20)
GUICtrlSetColor ( $checkCN , 0x0000FF )
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
Edited by Swimming_BIrd

Share this post


Link to post
Share on other sites
GaryFrost

i've tried that it didnt work.

i was only able to set the background color.

this leave the color as black

#include <GUIConstants.au3>

GUICreate("My GUI Checkbox")  ; will create a dialog box that when displayed is centered

$checkCN = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20)
GUICtrlSetColor ( $checkCN , 0x0000FF )
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
It worked for me, it set the text color as blue

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
Swimming_Bird

hrm very strange. every time i've tried that command the text remains black...

I've tried this exact code o on 2 different computers both running the latest beta and the latest man release. and running with neither the beta or the full release does the color change.

Edited by Swimming_BIrd

Share this post


Link to post
Share on other sites
MHz

Swimming_BIrd,

If it makes you feel any better, then I get only black also on WinXP Pro system.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.