Sign in to follow this  
Followers 0
killaz219

Button Color

37 posts in this topic

I checked out GuiSetControlex, GuiSetControlData, etc. But i still cant find out if i can change button color and button text color. Sorry if this is a little vauge but i dont really have much time befor i have to go somewhere and I'd like to see an answer when i got back.

Share this post


Link to post
Share on other sites



I was trying that too, yesterday. But I failed to make it work.

Share this post


Link to post
Share on other sites

I checked out GuiSetControlex, GuiSetControlData, etc. But i still cant find out if i can change button color and button text color. Sorry if this is a little vauge but i dont really have much time befor i have to go somewhere and I'd like to see an answer when i got back.

<{POST_SNAPBACK}>

Button color cannot be change the doc is incomplete on this subject. Sorry :ph34r:

Share this post


Link to post
Share on other sites

Do you know if it will be available in the future?

Share this post


Link to post
Share on other sites

Does anyone know of a way to set or change Button Color or Button Text Color yet?

I have been using $BS_BITMAP to set and change the image a button displays, but I would prefer a more versatile method where I would only need to change 0xFF0000 to 0x0000FF, in order to change the button color from red to blue.

I have searched the forum and wonder if anyone else has a good solution.

Is this possible?

Thanks for any help.

taurus905


"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Share this post


Link to post
Share on other sites

look at the GUIRegisterMsg example in the beta help

gafrost,

I appreciate your input. But I am not having any luck finding the "GUIRegisterMsg example" in "beta help".

I am not lazy, but could you please provide a link or more clues?

By "beta help", do you mean the "Latest Beta" thread? Because I did find mention of "GUIRegisterMsg" for 30th January, 2006 - v3.1.1.106 (beta).

I can usually figure something out from an example. So a link to the "GUIRegisterMsg example" is preferable.

Can anyone help me find this?

Thanks,

taurus905


"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Share this post


Link to post
Share on other sites

link to beta is in my signature, you'll need to install that, then you'll find a help for the beta that you've installed and in that you'll find what you need.

Gary


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

link to beta is in my signature, you'll need to install that, then you'll find a help for the beta that you've installed and in that you'll find what you need.

Gary

Gary,

Thanks a lot for getting me on the right track.

I just started using beta about a month ago when I wanted to use EnCodeIt. I thought I was keeping up with the updates, but I just discovered that my "beta help file" was not functioning. I was copying and pasting the updates from the extracted .zip file to the beta folder. I reinstalled it over the top of it and now it is working.

Thanks again.

taurus905


"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Gary,

Thanks a lot for getting me on the right track.

I just started using beta about a month ago when I wanted to use EnCodeIt. I thought I was keeping up with the updates, but I just discovered that my "beta help file" was not functioning. I was copying and pasting the updates from the extracted .zip file to the beta folder. I reinstalled it over the top of it and now it is working.

Thanks again.

taurus905

hey, can give an example on how you do just the text color and button.. 413 lines of code is hard to read.. or is all that necessary??? :think:

Edited by slightly_abnormal

Share this post


Link to post
Share on other sites

hey, can give an example on how you do just the text color and button.. 413 lines of code is hard to read.. or is all that necessary??? :think:

I actually think that this functionality MUST be part of the AutoIt GUI feature set. Making a colored button shouldn't be a matter of "black magic" as it is right now! That may be understandable to make other sorts of "fancy" buttons (with images, etc) but not to make a button with green text, for instance (and even a basic image button should be implemented in AutoIt, in my opinion).

Perhaps this should be filed as an open bug?

Angel

Share this post


Link to post
Share on other sites

I actually think that this functionality MUST be part of the AutoIt GUI feature set. Making a colored button shouldn't be a matter of "black magic" as it is right now! That may be understandable to make other sorts of "fancy" buttons (with images, etc) but not to make a button with green text, for instance (and even a basic image button should be implemented in AutoIt, in my opinion).

Perhaps this should be filed as an open bug?

Angel

Not a even a bug, think you might want to do a little research on button controls, ownerdrawn is the only way to change the colors.

Now if one of the devs decided to impliment ownerdrawn buttons then that's a different story.

But why impliment owner drawn buttons when you can create your own?


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

hey, can give an example on how you do just the text color and button.. 413 lines of code is hard to read.. or is all that necessary??? :think:

slightly_abnormal,

I agree. I am trying to boil it down to the Button Color and the Button Text Color.

When and if I figure it out, I will post an example.

I welcome anyone elses input on this.

It is encouraging to see that it is possible.

I feel lots of people would like to see a useable solution.

taurus905


"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

This should make it a little easier for you.

Edit: forgot to put the #include-once at the top of the include

Enjoy!!!

Gary

Edit: Moved attachments to Scripts and Scraps http://www.autoitscript.com/forum/index.php?showtopic=25077

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Very Nice gary!!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Very Nice gary!!

8)

I'm sure it could use some improvement, it was a quick and dirty write up

The WM_COMMAND function probably needs to be changed to work with other controls using WM_COMMAND.

Gary


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

yeah.. thanks gary. that test should be the example and the guibutton should be udf included in autoit. :think:

Share this post


Link to post
Share on other sites

This should make it a little easier for you.

Edit: forgot to put the #include-once at the top of the include

Enjoy!!!

Gary

Gary,

Thank you for boiling that down to make it easier for us non-developers to use and understand.

Great job my friend. :think:

taurus905


"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Share this post


Link to post
Share on other sites

This should make it a little easier for you.

Edit: forgot to put the #include-once at the top of the include

Enjoy!!!

Gary

Edit: Moved attachments to Scripts and Scraps http://www.autoitscript.com/forum/index.php?showtopic=25077

Gary,

Thanks for the user-friendly rgb feature. It fits with my other programs. :(

I've attached an example script that draws 12 buttons.

I am unsure why only the first 7 are visible when I run this script.

The other 5 buttons appear if you click on their area one at a time.

Or all 5 appear if you hit the Tab key.

Any ideas? :think:

taurus905

12_Buttons.au3


"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

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