Sign in to follow this  
Followers 0
CyberSlug

GuiCtrlSetColor on buttons...

5 posts in this topic

GUICtrlSetColor returns a "success" value for the button control, but the text did not change color

GuiCreate("ExampleFoo")
$button = GuiCtrlCreateButton("Should be red", 10, 10, 100, 100)
$returnVal = GUICtrlSetColor($button, 0xFF0000)

WinSetTitle("ExampleFoo","","Return value == " & $returnVal)
GuiSetState()
While GuiGetMsg() <> -3
WEnd

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites



GUICtrlSetColor returns a "success" value for the button control, but the text did not change color

GuiCreate("ExampleFoo")
$button = GuiCtrlCreateButton("Should be red", 10, 10, 100, 100)
$returnVal = GUICtrlSetColor($button, 0xFF0000)

WinSetTitle("ExampleFoo","","Return value == " & $returnVal)
GuiSetState()
While GuiGetMsg() <> -3
WEnd

<{POST_SNAPBACK}>

true but we cannot paint it as stated in Windows API doc

Buttons with the BS_PUSHBUTTON, BS_DEFPUSHBUTTON, or BS_PUSHLIKE styles do not use the returned brush.

I will correct the return :)

Share this post


Link to post
Share on other sites

Does this mean that it is not possible to use colored buttons with AutoGui? :)

I like colors! :)

Share this post


Link to post
Share on other sites

Does this mean that it is not possible to use colored buttons with AutoGui?  :)

I like colors!  :)

<{POST_SNAPBACK}>

I like colors too but in autoit we do not reimplement windows API. So we cannot find one to do what we want we stay with what we found.

In this specific case the API we are using does not allow to paint button text. ;)

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  
Followers 0