Jump to content

Recommended Posts

Posted (edited)

Hello I have created a textbox with the following command:

$Textbox = guicreateinput("", 0,0,0,0)

Now i want to make a case where you click a button and the whole text box disappears!

Is That possible?

Jacxonia

Edited by Jacxonia
Posted

Try this:

#include <GUIConstantsEx.au3>

Guicreate("")
Global $bHidden = False
Global $Textbox = GUICtrlCreateInput("", 10,10,100)
Global $Button = GUICtrlCreateButton("Hide",10,40,100)
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button
            If $bHidden Then
                GUICtrlSetState($Textbox,$GUI_SHOW)
                GUICtrlSetData($Button,"Hide")
            Else
                GUICtrlSetState($Textbox,$GUI_HIDE)
                GUICtrlSetData($Button,"Show")
            EndIf
            $bHidden = Not $bHidden
    EndSwitch
WEnd

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
×
×
  • Create New...