Jump to content

GuiCtrlSetColor on buttons...


CyberSlug
 Share

Recommended Posts

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!
Link to comment
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 :)
Link to comment
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. ;)

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...