Jump to content
Sign in to follow this  

Changing Textbox Text Color

Recommended Posts


Checkbox not textbox sorry.

The text color is still black.

$remember = GUICtrlCreateCheckbox ("Remember", 75, 270, 150, 15)
Edited by Hellfire

Share this post

Link to post
Share on other sites

couldnt tell u but a work around just put a label next to it, changing the Background color of the checkbox works just not the label

Share this post

Link to post
Share on other sites

it should work... and this too!

#include <GUIConstants.au3>

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

GUICtrlCreateCheckbox ("my Red label", 10,20)
GUICtrlSetColor(-1,0xff0000); Red
GUICtrlSetBkColor(-1,0x00ff00) ; Green

GUISetState ()

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

per help



Sets the text color of a control.

GUICtrlSetColor ( controlID, textcolor)


controlID The control identifier (controlID) as returned by a GUICtrlCreate... function.

textcolor The RGB color to use.

Return Value

Success: Returns 1.

Failure: Returns 0.


Only Label, Checkox, Group, Radio, Edit, Input, Listview, Treeview, Graphic and Progress controls can currently be colored.

must be a BUG



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