vvb Posted April 15, 2013 Posted April 15, 2013 (edited) Hi All, I have a combobox created via GUICtrlCreateCombo. What I want to do is to call a user defined function when the user changes the selection. I have tried using GUICtrlSetOnEvent, however it does not trigger the callback function at all. It works for buttons and checkboxes and radio boxes. Anyone know how to capture combobox selection change so that I can update another field according to what the user has selected? Kind Regards, Vlad Edited May 9, 2013 by vvb I'll be AutoIting my entire system soon.
FireFox Posted April 15, 2013 Posted April 15, 2013 Hi, Take a look at the _GUICtrlComboBox_Create function in the help file. You will see that the WM_COMMAND is your callback function and the code you need is $CBN_SELCHANGE. You can use the built-in GUICtrlCreateComboBox and use the $iIDFrom var instead of the $hWndFrom one. Br, FireFox.
vvb Posted April 16, 2013 Author Posted April 16, 2013 Hi FireFox, Cheers for that. Found out why my GUICtrlSetOnEvent for the ComboBox was not working, I had the wrong parameter passed in. Was using a single generic function to create controls with callbacks like buttons, radio buttons, checkboxes, comboboxes etc and was passing in the wrong parameter so the callback was never called. Cheers, Vlad I'll be AutoIting my entire system soon.
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