lyledg 0 Posted November 26, 2004 Guys.. Thanx for all your help thus far, you have all helped me tremendously.. I do however have one more question: I have about 10 checkboxes...What I am trying to do is create a Reset button which will uncheck all of them simultaneously, if they are indeed checked. How would I go about this Please? Cheers! Share this post Link to post Share on other sites
Lazycat 13 Posted November 26, 2004 (edited) You should uncheck each checkbox in your function. But you can simplicity this process, if you create array of control ID's at create time. Something like (pseudocode): #include <GUIConstants.au3> Global $check_array[10] GUICreate("GUI") $check_array[0] = GUICtrlCreateCheckbox(...) $check_array[1] = GUICtrlCreateCheckbox(...) ... $check_array[9] = GUICtrlCreateCheckbox(...) Func Reset() Local $i For $i = 0 To 9 GUICtrlSetState($check_array[$i], $GUI_UNCHECKED) Next EndFunc Edited November 26, 2004 by Lazycat Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Share this post Link to post Share on other sites
MHz 80 Posted November 26, 2004 Something different to Lazycat's method. This is out of one of my select case functions (trimmed), inside a loopCase $msg = $chk_301 If GUIRead($chk_301) = $GUI_CHECKED Then GUICtrlSetState($inp_303, $GUI_ENABLE) GUICtrlSetState($inp_305, $GUI_ENABLE) GUICtrlSetState($timezone, $GUI_ENABLE) GUICtrlSetState($inp_320, $GUI_ENABLE) GUICtrlSetState($inp_316, $GUI_ENABLE) GUICtrlSetState($inp_318, $GUI_ENABLE) GUICtrlSetState($refresh, $GUI_ENABLE) Else GUICtrlSetState($inp_303, $GUI_DISABLE) GUICtrlSetState($inp_305, $GUI_DISABLE) GUICtrlSetState($timezone, $GUI_DISABLE) GUICtrlSetState($inp_320, $GUI_DISABLE) GUICtrlSetState($inp_316, $GUI_DISABLE) GUICtrlSetState($inp_318, $GUI_DISABLE) GUICtrlSetState($refresh, $GUI_DISABLE) EndIf Now, If I check $chk_301 then all the all states of other controls change, ELSE they change the other way. Select case, look in the guide. Worthy reading, inside a While Wend loop, is handy. Share this post Link to post Share on other sites
lyledg 0 Posted November 26, 2004 Thanks Laztcat, you're solution was the best way forward. Also thanks to MHZ, as I am still learning the ropes ANY help and advice is taken notice of and learnt from the guru's! Cheers matey's!!! Share this post Link to post Share on other sites