hmobron Posted February 2, 2018 Share Posted February 2, 2018 Hello, I did some search around the form but can't find a answer for my problem. I fetch some data from a database. Then i want to create a combobox with say "Display name" and when i read the combobox get the ID of the selected "Display name". Whit other words, the same as HTML <select name="user" id="user"> <option value="25">Hans</option> <option value="43">Dik</option> </select> Is this possible or is there a other control to do that. Link to comment Share on other sites More sharing options...
Zedna Posted February 2, 2018 Share Posted February 2, 2018 (edited) As far as I know this is not possible with standard ComboBox in Windows (Win32 API) - but not sure at 100%. But you can use quite simple workaround: create two arrays: one for IDs and one for Display names both arrays will have the same index. After fetching value from ComboBox, find its ID from second array by the same index from first array (here matching by Display name). Edited February 2, 2018 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
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