I have this:
Code: Select all
F12::function_name()
function_name()
{
Test(&Test2)
MyGui := Gui()
MyGui.Add("DropDownList", "vSelectedKey", ['First','Second'])
MyGui.Add("Button", , "Submit").OnEvent("Click", Submit)
MyGui.Show()
Submit(*)
{
Saved := MyGui.Submit(true)
MsgBox Test2[Saved.SelectedKey]
}
}
Test(&Test2)
{
Test2 := Map(
'First', 'First value',
'Second', 'Second value',
)
}
Code: Select all
MyGui.Add("DropDownList", "vSelectedKey", ['First','Second'])
Code: Select all
Test_only_keys(&Test3)
{
Test3 :=
[
'First',
'Second'
]
}
The dropdownlist would only show the existing keys in the map.