ionized Posted March 9, 2011 Report Share Posted March 9, 2011 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! Quote Link to comment
Francois Normandin Posted March 9, 2011 Report Share Posted March 9, 2011 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. 1 Quote Link to comment
ionized Posted March 17, 2011 Author Report Share Posted March 17, 2011 To retrieve your data in the second column, use the "Item Names" property and index both column and row. Ah yep that did the trick for that part of it! I feel like I should've seen that one 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 Quote Link to comment
Francois Normandin Posted March 17, 2011 Report Share Posted March 17, 2011 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. 1 Quote Link to comment
ionized Posted March 22, 2011 Author Report Share Posted March 22, 2011 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! Thanks! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.