Fossil Rock 2 Posted September 18, 2007 Can a group be hidden all at once or do I have to stick with hiding each control individually? Agreement is not necessary - thinking for one's self is! Share this post Link to post Share on other sites
therks 33 Posted September 18, 2007 (edited) Individually. Want to see a trick I use though? There are lots of ways to hide groups of controls, but this one is one of my favorites lately. Note: This will only work for controls that are all created one after the other. #include <GUIConstants.au3> $gui = GUICreate('', 200, 200) $dm_Start = GUICtrlCreateDummy() GUICtrlCreateButton('', 0, 0, 100, 20) GUICtrlCreateButton('', 0, 20, 100, 20) GUICtrlCreateButton('', 0, 40, 100, 20) GUICtrlCreateButton('', 0, 60, 100, 20) GUICtrlCreateButton('', 0, 80, 100, 20) GUICtrlCreateInput('', 0, 100, 100, 20) GUICtrlCreateInput('', 0, 120, 100, 20) GUICtrlCreateInput('', 0, 140, 100, 20) GUICtrlCreateInput('', 0, 160, 100, 20) GUICtrlCreateInput('', 0, 180, 100, 20) $dm_End = GUICtrlCreateDummy() GUISetState() Sleep(1000) For $iCtrl = $dm_Start to $dm_End GUICtrlSetState($iCtrl, $GUI_HIDE) Next Sleep(1000) For $iCtrl = $dm_Start to $dm_End GUICtrlSetState($iCtrl, $GUI_SHOW) Next While 1 $gm = GUIGetMsg() Switch $gm Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Edited September 18, 2007 by Saunders My AutoIt Stuff | My Github Share this post Link to post Share on other sites
Fossil Rock 2 Posted September 18, 2007 Interesting ... thanks. Agreement is not necessary - thinking for one's self is! Share this post Link to post Share on other sites
Monamo 4 Posted September 18, 2007 Individually. Want to see a trick I use though? There are lots of ways to hide groups of controls, but this one is one of my favorites lately. Note: This will only work for controls that are all created one after the other. #include <GUIConstants.au3>[color="#0000FF"][/color] $gui = GUICreate('', 200, 200) $dm_Start = GUICtrlCreateDummy() GUICtrlCreateButton('', 0, 0, 100, 20) GUICtrlCreateButton('', 0, 20, 100, 20) GUICtrlCreateButton('', 0, 40, 100, 20) GUICtrlCreateButton('', 0, 60, 100, 20) GUICtrlCreateButton('', 0, 80, 100, 20) GUICtrlCreateInput('', 0, 100, 100, 20) GUICtrlCreateInput('', 0, 120, 100, 20) GUICtrlCreateInput('', 0, 140, 100, 20) GUICtrlCreateInput('', 0, 160, 100, 20) GUICtrlCreateInput('', 0, 180, 100, 20) $dm_End = GUICtrlCreateDummy() GUISetState() Sleep(1000) For $iCtrl = $dm_Start to $dm_End GUICtrlSetState($iCtrl, $GUI_HIDE) Next Sleep(1000) For $iCtrl = $dm_Start to $dm_End GUICtrlSetState($iCtrl, $GUI_SHOW) Next While 1 $gm = GUIGetMsg() Switch $gm Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Fantastic! I wish I'd thought of that! I typically went through the tedium of building an array list of items in a group and then For...Next'd 'em off and on. - 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] Share this post Link to post Share on other sites
therks 33 Posted September 19, 2007 That's the way I used to do it, and it's still the best way if you have a group of items that aren't all in a row (or get deleted and regenerated). My AutoIt Stuff | My Github Share this post Link to post Share on other sites