Frescard Posted September 6, 2018 Share Posted September 6, 2018 I've got a strange situation where, if I precede some radio buttons with a label, that I then cannot click them anymore (only the last one). I can select the active button via the cursor keys, though. Once I remove the label, everything works fine. Grouping them doesn't help. #include <GUIConstantsEx.au3> GUICreate("Checkboxes", 400,70) GUICtrlCreateLabel ("Click one:",20,23,300) ; if I remove this, everything works ;GuiCtrlCreateGroup("",100,10,280,35) ; no change if activated Dim $chk[3] $chk[0] = GUICtrlCreateRadio ("One", 120,20) $chk[1] = GUICtrlCreateRadio ("Two", 220,20) $chk[2] = GUICtrlCreateRadio ("Three",320,20) GUISetState() While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop WEnd Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 6, 2018 Moderators Share Posted September 6, 2018 Frescard, Your label overlaps the radios - as you can see here: #include <GUIConstantsEx.au3> GUICreate("Checkboxes", 400,70) GUICtrlCreateLabel ("Click one:",20,23,300) ; if I remove this, everything works GUICtrlSetBkColor(-1, 0xFFCCCC) ;GuiCtrlCreateGroup("",100,10,280,35) ; no change if activated Dim $chk[3] $chk[0] = GUICtrlCreateRadio ("One", 120,20) $chk[1] = GUICtrlCreateRadio ("Two", 220,20) $chk[2] = GUICtrlCreateRadio ("Three",320,20) GUISetState() While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop WEnd AutoIt get confused when active controls overlap as it cannot read your mind and know which one you wanted to fire - so it ignores them all. Solution: disable the label with GUICtrlSetState. 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...
pixelsearch Posted September 6, 2018 Share Posted September 6, 2018 (edited) Hi Frescard The width of your label is too big (320) it covers all Radio buttons ! Try it with a smaller number and all works fine Edited September 6, 2018 by pixelsearch Trying to delete my post as MB answered exactly same moment Link to comment Share on other sites More sharing options...
Frescard Posted September 6, 2018 Author Share Posted September 6, 2018 Ohhh... I didn't realize labels (and their sizes) had such a profound effect! Good to know. And thanks for the quick replies! 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