Jump to content

Recommended Posts

Posted

Sorry if this is an easy answer but I looked around for a couple of hours and I could not find where this is addressed. I have populated a combo box with an array and when the user selects an item from the combo box it initiates a change in the gui (example if they pick item one a check box is automatically checked). I know how to make this happen for a normal combobox but I can't seem to make it work for an array, in this case my variable $combo keeps returning a value of 14.

Any help would be great,

Thanks

$Combo = GuiCtrlCreatecombo('', 10, 100, 130, 100)
GUICtrlSetData($Combo, PopulateComboArray($MenuArray))
GUICtrlSetOnEvent($Combo, "FunCombo")


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Func FunCombo()

Select
    Case $Combo = item1
        MsgBox(0, "", $MenuArray[1])
    Case $Combo = item2
        MsgBox(0, "", "#2")
    Case Else
        MsgBox(0, "", $Combo)
EndSelect

EndFunc

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
  • Recently Browsing   0 members

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