Jump to content
Sign in to follow this  


Recommended Posts


Hello, I am new to the forums and somewhat a newbie at AutoIt. I am just now starting to get into making GUI's and I'm using Keda Form Designer (looks like Delphi!). Any way, I've been looking at some example code and the code the form designer puts out. I am wondering why you need GUICtrlCreateGroup("", -99, -99, 1, 1) at the end of a list of objects you want to add to the group. The command doesn't make sense as it just makes another gui object with wacked settings. I think there should be a better way to do this such as a function or parameter to set the parent (the groupbox) in the objects you create for the group box.

Local $grp1 = GUICtrlCreateGroup("D2 Tools", 2, 2, 84, 124, -1, $WS_EX_STATICEDGE)
Local $Radio1 = GUICtrlCreateRadio("None", 7, 23, 65, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "Radio1Click")
Local $Radio2 = GUICtrlCreateRadio("Red Vex", 7, 47, 65, 17)
GUICtrlSetOnEvent(-1, "Radio2Click")
Local $Radio3 = GUICtrlCreateRadio("Awesom-O", 7, 71, 73, 17)
GUICtrlSetOnEvent(-1, "Radio3Click")
Local $Radio4 = GUICtrlCreateRadio("Other", 7, 95, 65, 17)
GUICtrlSetOnEvent(-1, "Radio4Click")
GUICtrlCreateGroup("", -99, -99, 1, 1); is this really necessary?

Share this post

Link to post
Share on other sites


First, welcome to the AutoIt forums.

The short answer is that this apparently useless line is necessary because the developers have included it in the syntax and they must have their reasons! ;-)

The slightly longer answer is that it is not strictly necessary in all cases. If you have only the one group of radio buttons in your GUI, then omitting it does not cause a problem (or at least it has not for me in the past when I forgot, mea culpa), but if you require several such groups, AutoIt needs to know where one ends and another begins. It cannot read your mind, even if some scripters believe it should!

So, I would recommend that you do as the developers want and put it in, even if it strikes you as unnecessary (like the 2nd "n" in that word).

And as for suggesting script-breaking changes to the syntax in your first post, why would you want to upset Valik so quickly? ;-)


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:


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


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