LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Populate listbox dynamically

How to populate dinamically a listbox in NXG?

 

In labview I used to use property node, but in NXG 2.0  there is no "create property node" or "create reference", so how can I do?

0 Kudos
Message 1 of 21
(3,991 Views)

Hello,

right-click on listbox on block diagram and select "Create Reference" (or in the property menu on the right after selecting the control), you can even in LV NXG 2.0. Then you can connect the reference to a property node.

0 Kudos
Message 2 of 21
(3,947 Views)

ops, sorry, i forgot to specify that I'm on a WebVI and there is no "create reference"  

0 Kudos
Message 3 of 21
(3,944 Views)

you want the "Item Names" property


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 4 of 21
(3,943 Views)

As i said, it seems there is no reference and so, no property nodes for listbox in WebVI 😞

0 Kudos
Message 5 of 21
(3,939 Views)

If you use WebVI to build html file, then you can manually edit the html file to use html native listbox and update it with javascript for now.  After you done editing, click the apply button on the top-right to save the changes.

 

George Zou
0 Kudos
Message 6 of 21
(3,922 Views)

But I need to populate it dinamically.

i don't know wich items to put in the listbox 'cause are taken from a DB list.

 

0 Kudos
Message 7 of 21
(3,919 Views)

You won't see the native html listbox on the diagram.  To update the listbox dynamically, you can use javascript.

I made a ring ctrl last week, and update with javascript.

javascript is easy to learn, you don't have to be an expert.

 

George Zou
0 Kudos
Message 8 of 21
(3,915 Views)

Control Properties are not supported in WebVIs yet.  The only G solution I've found is to use the Data Grid as shown here:

 

W6HKsze

 

204956i5A3119910B3878DD.png

0 Kudos
Message 9 of 21
(3,901 Views)

Having some very long listbox, maybe datagrid is not the best solution but thank you for suggesting.
About javascript, ZOU, do you have an example?


I made a ring ctrl last week, and update with javascript.

javascript is easy to learn, you don't have to be an expert.

 

0 Kudos
Message 10 of 21
(3,872 Views)