Jump to content

Recommended Posts

Posted

...mentioned on a post that you could change the color of a button. I can't find any info on that other than his post. Is this possible? I have some buttons that are toggles and I would like to be able to change the button color or the button text color dependent on what state the toggle is in.

Posted

Sorry, I don't think I was correct when I said that you can change button color. You can change the text of the button, or make it the default button (which has a thicker boarder) or even make it a bigger physical button and moved up a bit to distiuguish it from the others.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Posted (edited)

I used toggle buttons with status labels --- i.e.

If $CURRENT_PID <> 0 Then
    GUIWrite($hTriggerStatus, -1, "Watchdog Running PID: " & $current_PID)
          GUISetControlEx($hTriggerStatus,0,0,"",0x00);set to black
  Else
    GUIWrite($hTriggerStatus, -1, "WatchDog NOT Running!")
          GUISetControlEx($hTriggerStatus,0,0,"",0xff);set to red ??? why is this bright blue?
  EndIf

I don't have a color map -- and it doesn't give results I'd expect from looking

at cyberslug's sample GUI (his 0xff value results in red text...) -- but it does at least create a visual cue of togglestatus. -

You also could add icon controls ....though I understand the wish to do everything

one one control.

Edited by flyingboz

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Posted

You can use a checkbox with the style BS_PUSHLIKE (I think that's the one) to make it look like a standard button, but behave like a checkbox.

Posted

I don't have a color map -- and it doesn't give results I'd expect from looking

at cyberslug's sample GUI (his 0xff value results in red text...) -- but it does at least create a visual cue of togglestatus.

Opt("ColorMode", ....) ;possible reason

ColorMode Sets the way colors are defined, either RGB or BGR. RGB is the default but in previous versions of AutoIt (pre 3.0.102) BGR was the default:

0 = Colors are defined as RGB (0xRRGGBB) (default)

1 = Colors are defined as BGR (0xBBGGRR) (the mode used in older versions of AutoIt)

0xFF == Red in old versions, 0xFF == Blue in new Versions

:ph34r: We really need to add a color chart to the appendix.

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

Ah... well thats plenty of things to try out then, cool, looks like I won't have a problem getting what I am after. :ph34r: Thanks guys'

Posted

You can use a checkbox with the style BS_PUSHLIKE (I think that's the one) to make it look like a standard button, but behave like a checkbox.

<{POST_SNAPBACK}>

Valik, that style is exactly what I was wanting.... I apologize for not seeing it. Love it.
Posted

OH hey Slug, what is Red in the newer versions?

<{POST_SNAPBACK}>

0xFF0000 should give you red. I get a different result if I just use 0xFF

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

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
  • Recently Browsing   0 members

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