cos Posted November 19, 2008 Share Posted November 19, 2008 Hi, i have made an application that when you hit a button you go to the next step and hit another you go again a step further (every time you hit the button the next button is shown). But here is the question, when i come to the end i have a end button (closes the program) and a return button. What i want is when you click on the return button you start over again, so my GUI has to be cleared, and the first button is shown again. is there a function or a way to clean up the GUI so every text, button ect is erased?? any suggestion is welcome thanks Link to comment Share on other sites More sharing options...
Aceguy Posted November 19, 2008 Share Posted November 19, 2008 (edited) is this what you want. #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 261, 166, 193, 125) $Button1 = GUICtrlCreateButton("Button1", 64, 40, 129, 33, 0) $Button2 = GUICtrlCreateButton("Button2", 64, 80, 129, 41, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $Button2 GUICtrlSetData($Button1,"NEW TEXT") GUICtrlDelete($Button2) EndSwitch WEnd Edited November 19, 2008 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
cos Posted November 19, 2008 Author Share Posted November 19, 2008 That is indeed what i needed, thanks. but i also notice that it does not work for the GUICtrlCreateInput. i have this in my code $scan = GUICtrlCreateInput ("",10, 260, 200, 20) but when i delete $scan (GUICtrlDelete ($scan_serialnumber)) it does not delete. I also got a failure on the return value. So how can i delete this one? thanks a lot Link to comment Share on other sites More sharing options...
Zedna Posted November 19, 2008 Share Posted November 19, 2008 GUICtrlSetData($scan,"") or GUICtrlDelete($scan) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
cos Posted November 19, 2008 Author Share Posted November 19, 2008 GUICtrlSetData($scan,"")orGUICtrlDelete($scan)sorry i made a typo so the GUICtrlDelete($scan) (and not GUICtrlDelete(($scan_serialnumber) what i typed first) does not work also the GUICtrlSetData($scan,"") doesn't do anything.thanks Link to comment Share on other sites More sharing options...
Zedna Posted November 19, 2008 Share Posted November 19, 2008 sorry i made a typo so the GUICtrlDelete($scan) (and not GUICtrlDelete(($scan_serialnumber) what i typed first) does not work also the GUICtrlSetData($scan,"") doesn't do anything.thanksPost more code. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
cos Posted November 19, 2008 Author Share Posted November 19, 2008 Post more code.He all,it works. i had some trouble with a variable that's why the GUICtrlDelete did not workthanks for all the help and 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