x60hz Posted October 26, 2012 Posted October 26, 2012 (edited) Hi all, I'm a Winbatch convert and let me tell you, I'm am so psyched about AutoIT. I love it so far. But I am having one annoying issue. I am using Koda to design my GUIs and I'm noticing that I can't get the controls to have that traditional beveled/3D look. I've tried playing with all the control styles (forms AND controls) and am having no luck. I've also tried it without using Koda and having the same problem. I'm hoping I'm just not doing something right. My controls - from checkboxes to buttons - all just look like rectangles. AutoIT is the one on the left and Winbatch is the one on the rightThanks for any help! Edited October 26, 2012 by x60hz
Moderators Melba23 Posted October 26, 2012 Moderators Posted October 26, 2012 x60hz,Welcome to the Autoit forum. It looks to me as if you are still in Koda in that screenshot - all my AutoIt GUIs look like the right-hand side image. I do not use Koda, but I know that Koda is just an aid to GUI contruction, not the final product. At the moment it looks as if you are still in the GUI editor mode.From my limited knowledge (gained over the past 2 minutes of running the app for the first time) I think you need to go to the <Tools - Run Form> menu item in Koda - then you see how the GUI will look when run. The <Tools - Generate Form Code> menu item will bring up a dialog with the actual AutoIt code to produce the GUI - copy that into SciTE and run it from there and I believe you will get what you are looking for. Come back if you still have problems and we will find someone more experienced in Koda than myself to help. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
x60hz Posted October 26, 2012 Author Posted October 26, 2012 Thanks for the suggestion but it looks exactly the same way when I run the script as when I'm designing it. I'm troubled that you say your GUIs look the way I want mine to. Hopefully someone will read this and have an answer for me.
Moderators Melba23 Posted October 26, 2012 Moderators Posted October 26, 2012 x60hz, Please run this very rough code from within SciTE and tell me if you still get the funny spotted backgound and flat controls: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) GUICtrlCreateLabel("Prefix", 10, 10, 50, 20) GUICtrlCreateLabel("Number/Letters", 150, 10, 200, 20) GUICtrlCreateLabel("Suffix", 300, 10, 50, 20) GUICtrlCreateLabel("Increment", 360, 10, 50, 20) GUICtrlCreateInput("", 10, 40, 50, 20) GUICtrlCreateInput("", 150, 40, 50, 20) GUICtrlCreateInput("", 300, 40, 50, 20) GUICtrlCreateInput("", 360, 40, 50, 20) GUICtrlCreateCheckbox(" Automatically add new record", 100, 400, 200, 20) GUICtrlCreateButton("Send", 180, 430, 80, 30) GUICtrlCreateButton("Cancel", 340, 430, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
x60hz Posted October 26, 2012 Author Posted October 26, 2012 Have a look...By the way, the spotted background was due to the fact that I was in Koda designer mode. That much I knew but these flat displaying controls are baffling me!
BrewManNH Posted October 27, 2012 Posted October 27, 2012 Try it with this change and let us know how it looks. #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) GUICtrlCreateLabel("Prefix", 10, 10, 50, 20, -1, $WS_EX_STATICEDGE) GUICtrlCreateLabel("Number/Letters", 150, 10, 200, 20, -1, $WS_EX_STATICEDGE) GUICtrlCreateLabel("Suffix", 300, 10, 50, 20, -1, $WS_EX_STATICEDGE) GUICtrlCreateLabel("Increment", 360, 10, 50, 20, -1, $WS_EX_STATICEDGE) GUICtrlCreateInput("", 10, 40, 50, 20, -1, $WS_EX_STATICEDGE) GUICtrlCreateInput("", 150, 40, 50, 20, -1, $WS_EX_STATICEDGE) GUICtrlCreateInput("", 300, 40, 50, 20, -1, $WS_EX_STATICEDGE) GUICtrlCreateInput("", 360, 40, 50, 20, -1, $WS_EX_STATICEDGE) GUICtrlCreateCheckbox(" Automatically add new record", 100, 400, 200, 20) GUICtrlCreateButton("Send", 180, 430, 80, 30) GUICtrlCreateButton("Cancel", 340, 430, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
Mat Posted October 27, 2012 Posted October 27, 2012 Probably won't work for the buttons BrewManNH...You want controls with an old visual style? Usually to enable visual styles you add a manifest to the exe as described here. Might well be possible to remove the manifest, make a copy of AutoIt3.exe then use a tool like reshacker. AutoIts not designed to be meddled with like that, so it might not work. AutoIt Project Listing
x60hz Posted October 27, 2012 Author Posted October 27, 2012 I'm just confused as to why others are not having this problem. I'm simply running a copy of XP SP3. It's my work PC. I'm going to try this on my home PC which has W7 on it and see what happens. By the way, thanks everyone for all your help so far.
Malkey Posted October 27, 2012 Posted October 27, 2012 While using Koda, see if you can get the controls to have that traditional beveled/3D look, using the "Object Inspector". The Object Inspector has three tabs at its bottom - Properties, Styles, and ExStyles. Activate an input box or a label or any control in the Form, and click on the ExStyles tab of the Object Inspector, and then, check the WS_EX_CLIENTEDDGE, and/or the WS_EX_STATICEDGE check box in the ExStyles tab and see the resulting change in appearence to that label control, input box control, button control or any control.
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