Jump to content
Sign in to follow this  

GUICtrlCreateInput Clean

Recommended Posts



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.

Share this post

Link to post
Share on other sites

GuiCtrlSetData($inputFactionNAME, "")

Share this post

Link to post
Share on other sites


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)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
        Case $BtnClean
Edited by nanyi0509

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.