stg68 Posted May 21, 2009 Share Posted May 21, 2009 Basically, I want to show or hide GuiCtrlCreateInput depending on the event what end user selects. In my case it is a checkbox check/uncheck. Thank you for your help! Link to comment Share on other sites More sharing options...
Authenticity Posted May 21, 2009 Share Posted May 21, 2009 #include <GUIConstantsEx.au3> Dim $hGUI Dim $Checkbox Dim $Input $hGUI = GUICreate('Test', 200, 100) $Checkbox = GUICtrlCreateCheckbox('Show', 20, 20) $Input = GUICtrlCreateInput('', 20, 60, 160,23) GUICtrlSetState(-1, $GUI_HIDE) GUISetState() While 1 Switch GUIGetMsg() Case $Checkbox If GUICtrlRead($Checkbox) = $GUI_CHECKED Then GUICtrlSetState($Input, $GUI_SHOW) GUICtrlSetData($Checkbox, 'Hide') Else GUICtrlSetState($Input, $GUI_HIDE) GUICtrlSetData($Checkbox, 'Show') EndIf Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() Exit The help file is your friend you could save about an half hour if you would take the effort. Link to comment Share on other sites More sharing options...
stg68 Posted May 21, 2009 Author Share Posted May 21, 2009 #include <GUIConstantsEx.au3> Dim $hGUI Dim $Checkbox Dim $Input $hGUI = GUICreate('Test', 200, 100) $Checkbox = GUICtrlCreateCheckbox('Show', 20, 20) $Input = GUICtrlCreateInput('', 20, 60, 160,23) GUICtrlSetState(-1, $GUI_HIDE) GUISetState() While 1 Switch GUIGetMsg() Case $Checkbox If GUICtrlRead($Checkbox) = $GUI_CHECKED Then GUICtrlSetState($Input, $GUI_SHOW) GUICtrlSetData($Checkbox, 'Hide') Else GUICtrlSetState($Input, $GUI_HIDE) GUICtrlSetData($Checkbox, 'Show') EndIf Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() Exit The help file is your friend you could save about an half hour if you would take the effort. Thank you very much for your help! 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