Sign in to follow this  
Followers 0
Zodiak

GUICtrlCreateInput Clean

4 posts in this topic

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.

Share this post


Link to post
Share on other sites



GuiCtrlSetData($inputFactionNAME, "")

Share this post


Link to post
Share on other sites

Thanks.

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 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  
Followers 0