Jump to content

GUICtrlCreateInput Clean


 Share

Recommended Posts

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

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...