Hammer Posted December 16, 2007 Share Posted December 16, 2007 I have a radio button group and a drop down combo box. I would like the items in the combo box to change when a different radio button is selected. I can't seem to figure out the logic to do this. Any hints? Thanks, Hammer Link to comment Share on other sites More sharing options...
FreeSiker Posted December 16, 2007 Share Posted December 16, 2007 Hi Try this ! The most important thing is to add the default separator before the item list "|" "|item1|item2|item3" #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 633, 447, 193, 125) $Radio1 = GUICtrlCreateRadio("Radio1", 64, 56, 89, 41) $Radio2 = GUICtrlCreateRadio("Radio2", 64, 120, 89, 49) $Radio3 = GUICtrlCreateRadio("Radio3", 64, 192, 129, 81) $Combo1 = GUICtrlCreateCombo("Combo1", 176, 344, 257, 25) GUICtrlSetData(-1,"item1|item2|item3", "Combo1") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Radio1 GUICtrlSetData($Combo1, "|item1|item2|item3", "item1") Case $Radio2 GUICtrlSetData($Combo1,"|item1|item2|item3", "item2") Case $Radio3 GUICtrlSetData($Combo1,"|item1|item2|item3", "item3") Case $Combo1 EndSwitch WEnd Link to comment Share on other sites More sharing options...
Hammer Posted December 16, 2007 Author Share Posted December 16, 2007 Great, thank you! 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