cyberparam Posted May 28, 2008 Posted May 28, 2008 Hi, I have created a simple combo box inside a GUI window Code: $combo = GUICtrlCreateCombo ("item1", 40, 120, 250, 20) $read = GUICtrlSetData(-1,"item2|item3") $comboData = GUICtrlRecvMsg($combo) In the GUI when i change selection to item2 or item3, and try to read data from the Combo box, I get 'item1' but not 'item2' or 'item3' inside $comboData. Why is this so?
Andreik Posted May 28, 2008 Posted May 28, 2008 Hi, I have created a simple combo box inside a GUI windowCode:$combo = GUICtrlCreateCombo ("item1", 40, 120, 250, 20) $read = GUICtrlSetData(-1,"item2|item3")$comboData = GUICtrlRecvMsg($combo)In the GUI when i change selection to item2 or item3, and try to read data from the Combo box, I get 'item1' but not 'item2' or 'item3' inside $comboData. Why is this so?GuiCtrlRead($combo)
cyberparam Posted May 29, 2008 Author Posted May 29, 2008 GuiCtrlRead($combo)Even GUICtrlRead($combo) gives 'item1' as result? I don.t get 'item2' or 'item3' when i select them?Please help.
ResNullius Posted May 29, 2008 Posted May 29, 2008 Even GUICtrlRead($combo) gives 'item1' as result? I don.t get 'item2' or 'item3' when i select them? Please help.Try this: #include<GuiConstants.au3> GUICreate("") $combo = GUICtrlCreateCombo ("item1", 40, 120, 250, 20) $read = GUICtrlSetData(-1,"item2|item3") GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $combo $comboData = GUICtrlRead($combo) MsgBox(0,"",$comboData) EndSwitch WEnd
ResNullius Posted May 29, 2008 Posted May 29, 2008 (edited) thank you RN.You're welcome.Edit: can't even spell "you're" right this morning Edited May 29, 2008 by ResNullius
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