05-31-2011 06:33 PM
Hi,
I have some clusters that contain enums where the user can select one value among many. However, sometimes these enums stand for binary flags and I want the user to be able to select more than one flag at the same time which will then be ORd. What I normally do is have an array with the data type as the enum and I simply OR all the elements in the array.
I was just wondering if anyone has a better suggestion of how to do this?
Thanks,
M
Solved! Go to Solution.
06-01-2011 12:58 AM - edited 06-01-2011 12:59 AM
Use a listbox and allow multiple items to be selected. It returns an array containg the indices of all the selected items. You can use that to look up the values of what each element means to you from another array. Or if the order of the items in the array is just right, you can do a 2 ^ array math function and add the resulting array together.