LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Access Item Names Property of ListBox inside of Cluster?

Solved!
Go to solution

In LabVIEW 2010 I have a Cluster of Controls on the Front Panel. In that Cluster I have a ListBox. How do I access the Item Names Property of the ListBox in my Block Diagram.

 

From the Cluster, I can get the ListBox, but that returns an I32 value, probably the index of the selected Item.

 

In the Block Diagram, how can I get the Item Name Property of the ListBox from a Reference to the Cluster?

 

THANKS.

0 Kudos
Message 1 of 3
(4,004 Views)
Solution
Accepted by topic author dbaechtel

by using the "controls" array of your cluster, you can access the individual elements. You have then to convert the reference to a "more specific class" using a reference to an arbitrary listbox (or a constant reference of the required type), then you can access all properties of your listbox.

 

23532i1DB5485E431B7492


THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
Message 2 of 3
(3,997 Views)

From the original question, I gather that the OP does not know the label name of the listbox item.  The following code will get the labels of all items inside the cluster.

 

 

23536i0DE77F409A3C80EF

- tbob

Inventor of the WORM Global
Message 3 of 3
(3,990 Views)