soulhealer Posted March 7, 2008 Share Posted March 7, 2008 hi, i wish to hide a groupbox GUI control with the controls inside, but when i tried to GuiCtrlSetState($groupgui,$GUI_HIDE) what i hide is only the groupbox rectangle lines, it doesn't hide the other gui controls that is linked to the groupbox. how to hide them instead of having to hide the controls one by one? thanks for any helps. Link to comment Share on other sites More sharing options...
Monamo Posted March 7, 2008 Share Posted March 7, 2008 hi, i wish to hide a groupbox GUI control with the controls inside, but when i tried to GuiCtrlSetState($groupgui,$GUI_HIDE) what i hide is only the groupbox rectangle lines, it doesn't hide the other gui controls that is linked to the groupbox. how to hide them instead of having to hide the controls one by one? thanks for any helps.Here's a nifty method of handling it by Saunders -> post link - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup] Link to comment Share on other sites More sharing options...
soulhealer Posted March 8, 2008 Author Share Posted March 8, 2008 Here's a nifty method of handling it by Saunders -> post linki thought(wish) there is a simpler way. anyway, your method works too, thanks. Link to comment Share on other sites More sharing options...
ilogic32 Posted July 21, 2014 Share Posted July 21, 2014 Thanks for the help this is what I made of it: expandcollapse popup#include <GUIConstantsEx.au3> #include <Constants.au3> #include <StaticConstants.au3> ; Create GUI $hGUI_schedule = GUICreate("test", 650, 230) GUICtrlCreateGraphic(0, 0, 700, 70,$SS_GRAYFRAME) GUICtrlSetBkColor(-1, 0xffffff) GUICtrlSetColor(-1, 0) GUICtrlCreateGraphic(5, 80, 150, 130,bitor($SS_GRAYFRAME,$SS_SUNKEN)) GUICtrlCreateGraphic(165, 80, 475, 130,bitor($SS_GRAYFRAME,$SS_SUNKEN)) GUICtrlCreateLabel("Test",20,20,400,50) GUICtrlSetFont(-1, 9, 600, 0, "Arial") GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $radio1 = GUICtrlCreateRadio("Group1",10,90) $radio2 = GUICtrlCreateRadio("Group2",10,110) $radio3 = GUICtrlCreateRadio("Group3",10,130) $radio4 = GUICtrlCreateRadio("Group4",10,150) $radio5 = GUICtrlCreateRadio("Group5",10,170) GUICtrlSetState($radio1, $GUI_CHECKED) dim $aGroup1[4] $aGroup1[0] = GUICtrlCreateGroup("Group1", 175, 85, 450, 110) $aGroup1[1] = GUICtrlCreateRadio("Radio 1", 210, 110, 70, 20) $aGroup1[2] = GUICtrlCreateRadio("Radio 2", 210, 130, 70, 50) GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group dim $aGroup2[4] $aGroup2[0] = GUICtrlCreateGroup("Group2", 175, 85, 450, 110) $aGroup2[1] = GUICtrlCreateRadio("Radio 4", 210, 110, 70, 20) $aGroup2[2] = GUICtrlCreateRadio("Radio 5", 210, 130, 70, 50) GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group For $i = 0 To UBound($aGroup2)-1 GUICtrlSetState ( $aGroup2[$i], $GUI_HIDE ) Next dim $aGroup3[4] $aGroup3[0] = GUICtrlCreateGroup("Group3", 175, 85, 450, 110) $aGroup3[1] = GUICtrlCreateRadio("Radio 6", 210, 110, 70, 20) $aGroup3[2] = GUICtrlCreateRadio("Radio 7", 210, 130, 70, 50) GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group For $i = 0 To UBound($aGroup3)-1 GUICtrlSetState ( $aGroup3[$i], $GUI_HIDE ) Next dim $aGroup4[4] $aGroup4[0] = GUICtrlCreateGroup("Group4", 175, 85, 450, 110) $aGroup4[1] = GUICtrlCreateRadio("Radio 8", 210, 110, 70, 20) $aGroup4[2] = GUICtrlCreateRadio("Radio 9", 210, 130, 70, 50) GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group For $i = 0 To UBound($aGroup4)-1 GUICtrlSetState ( $aGroup4[$i], $GUI_HIDE ) Next dim $aGroup5[5] $aGroup5[0] = GUICtrlCreateGroup("Group5", 175, 85, 450, 110) $aGroup5[1] = GUICtrlCreateRadio("Radio 10", 210, 110, 70, 20) $aGroup5[2] = GUICtrlCreateRadio("Radio 11", 210, 130, 70, 50) GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group For $i = 0 To UBound($aGroup5)-1 GUICtrlSetState ( $aGroup5[$i], $GUI_HIDE ) Next GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED _HideGroups() For $i = 0 To UBound($aGroup1)-1 GUICtrlSetState ( $aGroup1[$i], $GUI_SHOW ) Next Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED _HideGroups() For $i = 0 To UBound($aGroup2)-1 GUICtrlSetState ( $aGroup2[$i], $GUI_SHOW ) Next Case $msg = $radio3 And BitAND(GUICtrlRead($radio3), $GUI_CHECKED) = $GUI_CHECKED _HideGroups() For $i = 0 To UBound($aGroup3)-1 GUICtrlSetState ( $aGroup3[$i], $GUI_SHOW ) Next Case $msg = $radio4 And BitAND(GUICtrlRead($radio4), $GUI_CHECKED) = $GUI_CHECKED _HideGroups() For $i = 0 To UBound($aGroup4)-1 GUICtrlSetState ( $aGroup4[$i], $GUI_SHOW ) Next Case $msg = $radio5 And BitAND(GUICtrlRead($radio5), $GUI_CHECKED) = $GUI_CHECKED _HideGroups() For $i = 0 To UBound($aGroup5)-1 GUICtrlSetState ( $aGroup5[$i], $GUI_SHOW ) Next EndSelect WEnd Func _HideGroups() For $i = 0 To UBound($aGroup1)-1 GUICtrlSetState ( $aGroup1[$i], $GUI_HIDE ) Next For $i = 0 To UBound($aGroup2)-1 GUICtrlSetState ( $aGroup2[$i], $GUI_HIDE ) Next For $i = 0 To UBound($aGroup3)-1 GUICtrlSetState ( $aGroup3[$i], $GUI_HIDE ) Next For $i = 0 To UBound($aGroup4)-1 GUICtrlSetState ( $aGroup4[$i], $GUI_HIDE ) Next For $i = 0 To UBound($aGroup5)-1 GUICtrlSetState ( $aGroup5[$i], $GUI_HIDE ) Next EndFunc Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 21, 2014 Moderators Share Posted July 21, 2014 ilogic32,Welcome to the AutoIt forums. You do realise that the post above yours dates from over 8 years ago? In future please do not resurrect threads from this far back - the language has changed so much that it is likely that the previously posted code will almost certainly not run in the current version of AutoIt without modification. 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...
Moderators Melba23 Posted July 21, 2014 Moderators Share Posted July 21, 2014 ilogic32, You also seem to be closely related to members ilogic and castens. We do not allow multiple accounts here - do you keep forgetting your password? If they are all you, please tell me which one you want to keep and I will merge them. If not, can you explain why I see so much evidence that they are? 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