Jump to content

3D and Beveled Controls


x60hz
 Share

Recommended Posts

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 right

Posted Image

Thanks for any help!

Edited by x60hz
Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 Gude
How 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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...