Elishac Posted August 8, 2009 Share Posted August 8, 2009 Hi. I have a GUI where there are 3 radios. Let's say the question is "how old are you", and $radio1 says 10, while $radio2 says 20. I'd like $radio3 to be an input square where you can put your age if it's neither 10 nor 20. I'd like this square to be gray (GUICtrlSetState(-1, $GUI_Disable)) unless $radio3 is checked. My problem is that if I click on $radio3 then on $radio2, the input square is "enabled" but I'd like it to become "disabled" again. I hope you have understood my question and I hope you'll be able to help me, as I believe my script is too long and too complicated to be posted here. Regards. Link to comment Share on other sites More sharing options...
water Posted August 8, 2009 Share Posted August 8, 2009 Something like this (taken from the help file for GUICtrlCreateRadio): #include <GUIConstantsEx.au3> GUICreate("Test") $radio1 = GUICtrlCreateRadio("Radio 1", 10, 10, 120, 20) $radio2 = GUICtrlCreateRadio("Radio 2", 10, 40, 120, 20) $radio3 = GUICtrlCreateRadio("Radio 3", 10, 70, 120, 20) $input = GuiCtrlCreateInput("Input",10,100,120,20) GUICtrlSetState(-1, $GUI_Disable) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $radio1 or $msg = $radio2 GUICtrlSetState($input, $GUI_Disable) Case $msg = $radio3 GUICtrlSetState($input, $GUI_Enable) EndSelect WEnd My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Elishac Posted August 8, 2009 Author Share Posted August 8, 2009 ok, thanks. 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