Jump to content

radio button controlling list in combo box


Hammer
 Share

Recommended Posts

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...