RichardAR Posted June 4, 2009 Share Posted June 4, 2009 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? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 4, 2009 Moderators Share Posted June 4, 2009 RichardAR,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? ;-)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 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