Zodiak Posted May 22, 2009 Share Posted May 22, 2009 Hi, I created a GUICtrlCreateInput and a GUICtrlCreateButton like code below GUICtrlCreateGroup("Nome", 110, 110, 90, 90) $inputFactionNAME = GUICtrlCreateInput($FactionNAME_ini, 115, 130, 80, 20) $ButtonFactionCLEAN = GUICtrlCreateButton("Clean", 125, 163, 60) GUICtrlCreateGroup("", -99, -99, 1, 1) The problem now is how to clean the input box by pushing the button. For example: input box is empty I write "hallo world" and now I would like to restore back the input box as empty, by pushing the button. Link to comment Share on other sites More sharing options...
wraithdu Posted May 22, 2009 Share Posted May 22, 2009 GuiCtrlSetData($inputFactionNAME, "") Link to comment Share on other sites More sharing options...
Zodiak Posted May 23, 2009 Author Share Posted May 23, 2009 Thanks. Link to comment Share on other sites More sharing options...
nanyi0509 Posted May 28, 2009 Share Posted May 28, 2009 (edited) Hello,Zodiak There is a simaple example: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 225, 158, 192, 124) $Input1 = GUICtrlCreateInput("", 32, 24, 153, 21) $BtnClean = GUICtrlCreateButton("Clean", 64, 80, 81, 33, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $BtnClean GUICtrlSetData($Input1,"") EndSwitch WEnd Edited May 28, 2009 by nanyi0509 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