Hooch Posted August 2, 2004 Posted August 2, 2004 ...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.
pekster Posted August 2, 2004 Posted August 2, 2004 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.
flyingboz Posted August 2, 2004 Posted August 2, 2004 (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 August 2, 2004 by flyingboz Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.
Valik Posted August 2, 2004 Posted August 2, 2004 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.
CyberSlug Posted August 3, 2004 Posted August 3, 2004 I don't have a color map -- and it doesn't give results I'd expect from lookingat 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 reasonColorMode 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 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!
Hooch Posted August 3, 2004 Author Posted August 3, 2004 Ah... well thats plenty of things to try out then, cool, looks like I won't have a problem getting what I am after. Thanks guys'
Hooch Posted August 3, 2004 Author Posted August 3, 2004 OH hey Slug, what is Red in the newer versions?
Hooch Posted August 3, 2004 Author Posted August 3, 2004 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.
pekster Posted August 3, 2004 Posted August 3, 2004 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now