Oldschool Posted November 29, 2007 Share Posted November 29, 2007 I can only have 1 checked at one time... How to I make them independent? #include <GUIConstants.au3> GUICreate("My GUI radio") ; will create a dialog box that when displayed is centered GUICtrlCreateLabel("CRM:", 40, 10) $radio1 = GUICtrlCreateRadio ("Enabled", 20, 30, 60, 20) $radio2 = GUICtrlCreateRadio ("Disabled", 90, 30, 60, 20) GUICtrlSetState ($radio2, $GUI_CHECKED) GUICtrlCreateLabel("Notice To e-mail:", 240, 10) $radio3 = GUICtrlCreateRadio ("Enabled", 220, 30, 60, 20) $radio4 = GUICtrlCreateRadio ("Disabled", 290, 30, 60, 20) GUICtrlSetState ($radio4, $GUI_CHECKED) GUISetState () ; will display an dialog box with 1 checkbox ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED MsgBox(64, 'Info:', 'You clicked the Radio 1 and it is Checked.') Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED MsgBox(64, 'Info:', 'You clicked on Radio 2 and it is Checked.') Case $msg = $radio3 And BitAND(GUICtrlRead($radio3), $GUI_CHECKED) = $GUI_CHECKED MsgBox(64, 'Info:', 'You clicked the Radio 1 and it is Checked.') Case $msg = $radio4 And BitAND(GUICtrlRead($radio4), $GUI_CHECKED) = $GUI_CHECKED MsgBox(64, 'Info:', 'You clicked on Radio 2 and it is Checked.') EndSelect Wend Link to comment Share on other sites More sharing options...
weaponx Posted November 29, 2007 Share Posted November 29, 2007 GUICtrlCreateGroup ("Group 1", 190, 60, 90, 140) $radio_1 = GUICtrlCreateRadio ("Radio 1", 210, 90, 50, 20) $radio_2 = GUICtrlCreateRadio ("Radio 2", 210, 110, 60, 50) GUICtrlCreateGroup ("",-99,-99,1,1) ;close group GUICtrlCreateGroup ("Group 2", 190, 60, 90, 140) $radio_3 = GUICtrlCreateRadio ("Radio 3", 210, 90, 50, 20) $radio_4 = GUICtrlCreateRadio ("Radio 4", 210, 110, 60, 50) GUICtrlCreateGroup ("",-99,-99,1,1) ;close group Link to comment Share on other sites More sharing options...
Oldschool Posted December 1, 2007 Author Share Posted December 1, 2007 GUICtrlCreateGroup ("Group 1", 190, 60, 90, 140)$radio_1 = GUICtrlCreateRadio ("Radio 1", 210, 90, 50, 20)$radio_2 = GUICtrlCreateRadio ("Radio 2", 210, 110, 60, 50)GUICtrlCreateGroup ("",-99,-99,1,1) ;close groupGUICtrlCreateGroup ("Group 2", 190, 60, 90, 140)$radio_3 = GUICtrlCreateRadio ("Radio 3", 210, 90, 50, 20)$radio_4 = GUICtrlCreateRadio ("Radio 4", 210, 110, 60, 50)GUICtrlCreateGroup ("",-99,-99,1,1) ;close groupThx 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