Jump to content

Multi-value listbox items


Recommended Posts

In labVIEW 2010 I am attempting to make a list box where when you select an item from it the value that is selected will have two different values: one for its name and one for its actual value much like with a combo box. I was wondering if this might even be possible with the normal list box and if there is anyone with any insight on how I can achieve this goal?

Another option that I have looked into that I haven't quite figured out how to do yet, if it again is even possible, might be to use a multi-column list box and instead have the item name in one column and the value in the other; however, I haven't found out how I can select the second column of the same row dynamically, nor have I found out how to hide the second row (the value row) so the end user doesn't have to look at it.

If either of these options are possible any help toward the end goal would be very much appreciated.

The main goal of this is to be able to select multiple items at once unlike with the combo box which can only select a single item at a time so any other solutions are welcome also!

Thanks!

Link to comment

Another option that I have looked into that I haven't quite figured out how to do yet, if it again is even possible, might be to use a multi-column list box and instead have the item name in one column and the value in the other; however, I haven't found out how I can select the second column of the same row dynamically, nor have I found out how to hide the second row (the value row) so the end user doesn't have to look at it.

To retrieve your data in the second column, use the "Item Names" property and index both column and row.

post-10515-0-90408600-1299690677_thumb.p

  • Like 1
Link to comment
  • 2 weeks later...

To retrieve your data in the second column, use the "Item Names" property and index both column and row.

post-10515-0-90408600-1299690677_thumb.p

Ah yep that did the trick for that part of it! I feel like I should've seen that one :blink:

I take it that there is no way to hide the second column though huh?

Thanks for showing me how to get the data though :rolleyes:

Link to comment

I take it that there is no way to hide the second column though huh?

If you resize the MCL, you can hide the data by showing only the first column.

However, if you want to keep it separate, you can make an index in a functional global variable. Store the data associated with each listbox element in the FGV and retrieve it on demand whenever there's a value change for the listbox.

  • Like 1
Link to comment

If you resize the MCL, you can hide the data by showing only the first column.

However, if you want to keep it separate, you can make an index in a functional global variable. Store the data associated with each listbox element in the FGV and retrieve it on demand whenever there's a value change for the listbox.

Alright! that works! :thumbup1:

Thanks!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.