Angel Posted January 18, 2005 Share Posted January 18, 2005 I am trying to create a GUI with several buttons. One of them is the most important one, and I'd like to show that clearly by changing the background and text colors. However it does not seem to work. I am using the GUICtrlSetBkColor and GUICtrlSetColor functions. I think that I tried something similar some time ago, but it was when the GUI stuff was not still stable so I thought that it simply was a bug that had not been fixed yet. Does anyone know if it is possible to do this and if not why? It seems like a pretty important limitation... Cheers, Angel Link to comment Share on other sites More sharing options...
Lazycat Posted January 18, 2005 Share Posted January 18, 2005 (edited) No, you can't colorize buttons, at least for now. Some time ago I'm also stuck with this problem. You can try to emulate button with label. In my script I used this code: GUICtrlCreateLabel("", 15, 400, 150, 30, BitOr($WS_DISABLED, $SS_BLACKFRAME)) $btn = GUICtrlCreateLabel("Button", 16, 401, 148, 28, BitOr($SS_CENTER, $SS_CENTERIMAGE)); this one will notify GUICtrlSetCursor(-1, 0) GUICtrlSetBkColor(-1, $bgcolor) This will give flat "button" with the black frame and hand cursor. Edit: small fixes Edited January 18, 2005 by Lazycat Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
Angel Posted January 18, 2005 Author Share Posted January 18, 2005 Thanks a lot for the tip, Lazycat. I will try it out. Does anybody know why it is not possible to change button colors? Is this a windows limitation? Angel Link to comment Share on other sites More sharing options...
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