hmsSurprise Posted April 15, 2007 Posted April 15, 2007 Greetings, I have been using AutoIt for about a week and a half now and decided to start work on the GUI portion of my project. Thought I would try using Koda and the first form I have tried I am unable to set the button color, background or text. Don't know enough at this point about Gui generation to know if this is a Koda bug or just a user error. Thanks, jh
Gcommer Posted April 15, 2007 Posted April 15, 2007 The text should be easy to set, while you have focus on the button, click on caption in the object inspector. For colored buttons, try searching the forum. I know i've seen them somewhere
Gcommer Posted April 15, 2007 Posted April 15, 2007 I found it : http://www.autoitscript.com/forum/index.ph...colored+buttons (by gafrost)
hmsSurprise Posted April 15, 2007 Author Posted April 15, 2007 Thanks for posting. I see now that my post was unclear. I meant that I could not set the color for the button text or the color for the button background. I was hoping I could set the color using Koda. jh
Valuater Posted April 15, 2007 Posted April 15, 2007 (edited) For a Skin style and button color/style themes you can use EzSkinhttp://www.autoitscript.com/forum/index.ph...st&p=307380 Edited April 15, 2007 by Valuater
Valuater Posted April 15, 2007 Posted April 15, 2007 Interesting.........lol... big on words huh???did you give it a try??8)
GaryFrost Posted April 15, 2007 Posted April 15, 2007 The setting of button colors is in the latest beta, probably koda hasn't been changed to reflect this. i.e. #include <GUIConstants.au3> GUICreate("My GUI background color") ; will create a dialog box that when displayed is centered GUICtrlCreateLabel ("my label", 10,20) GUICtrlSetBkColor(-1,0x00ff00) ; Green GUICtrlCreateButton("Test",10,40,90,25) GUICtrlSetBkColor(-1,0x00000) GUICtrlSetColor(-1,0xffffff) GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference. Â
hmsSurprise Posted April 16, 2007 Author Posted April 16, 2007 lol... big on words huh???did you give it a try??8)Spent about 15 minutes working with it. No directory, no skin file, etc, typical newbie errors. I like the looks of it so I bookmarked it and will use it later. Right now I have more basic issues to get past, like my very first GUI design. Remember what happened to Alice when she looked at a GUI designed by Dilbert? Right now I am Dilbert, with no feel for laying out a GUI.Thanks for posting,jh
hmsSurprise Posted April 16, 2007 Author Posted April 16, 2007 The setting of button colors is in the latest beta, probably koda hasn't been changed to reflect this. i.e. #include <GUIConstants.au3> GUICreate("My GUI background color") ; will create a dialog box that when displayed is centered GUICtrlCreateLabel ("my label", 10,20) GUICtrlSetBkColor(-1,0x00ff00) ; Green GUICtrlCreateButton("Test",10,40,90,25) GUICtrlSetBkColor(-1,0x00000) GUICtrlSetColor(-1,0xffffff) GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Thanks for posting, ga. jh
Noob Posted April 16, 2007 Posted April 16, 2007 The setting of button colors is in the latest beta, probably koda hasn't been changed to reflect this. i.e. GUICtrlCreateButton("Test",10,40,90,25) GUICtrlSetBkColor(-1,0x00000) GUICtrlSetColor(-1,0xffffff) It's doable with the latest Beta, but the buttons don't have the "3D look" when colors are applied
Valuater Posted April 19, 2007 Posted April 19, 2007 It's doable with the latest Beta, but the buttons don't have the "3D look" when colors are applied I noticed that too! ...Gary put a lot of time into that one, but i don't think the "3D" effect is available with colorsAFAIK8)
Holger Posted April 19, 2007 Posted April 19, 2007 I tried some things out the last days with using themes/visual styles and it seems not do difficult. However, with these API-functions one you can only change the text color ie. of a button - logical, cause the theme stuff is based on images. (BTW: the GUIRegisterMsg-sample in the helpfile to start from was from me and it took me a lot of time too to read a lot of coding stuff and trying things out ) However, Gary wrote the very good UDF And so why not just use the UDF again - whats the problem to use it? Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
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