Sign in to follow this  
Followers 0
Newb

Is _GUICtrlListBox_SetItemData available for other controls?

3 posts in this topic

Hi,

I've used with success _GUICtrlListBox_SetItemData with a ListBox so for a selected value, I had the possibility to retrevie an associated value with _GUICtrlListBox_GetItemData.

Is this available for other kind of controls like Combo Boxes or similar?

For example now i have to deal with this List Box

Global $ComboReachs = GUICtrlCreateCombo("", 176, 297, 81, 25,0x3)
GuiCtrlSetData(-1,"25%|50%|75%|100%","100%")

and I would like to know if i could assign a relative value to every element so while reading the selected one, I can do a specific action based on the value assigned.

I know there are lot of ways to do this (filling the box with an array like this $Value1[2]=[25%,25] or even bidimensional arrays, stripping the value with GuiCtrlRead and with string manipulations and so on, and many others), just wanted to know if something similar it'a available for Combo boxes and other controls.

Thanks


I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

Share this post


Link to post
Share on other sites



You just have to dig into the documentation. Have a look at _GUICtrlComboBoxEx_SetItemParam and _GUICtrlComboBoxEx_GetItemParam.

Share this post


Link to post
Share on other sites

You just have to dig into the documentation. Have a look at _GUICtrlComboBoxEx_SetItemParam and _GUICtrlComboBoxEx_GetItemParam.

Thanks. Actually, i looked into help file, but while SetItemData was more intuitive, _GUICtrlComboBoxEx_SetItemParam wasn't, at least for me. I'll have to look deeper next time.

I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0