LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to add options in ui for user request

Hi,

 

i want to give the user a one line to fill and give him also an "ADD" button so if he choose it another input line is added to the UI and all the other lines move lower in te UI.

 

kind of like the attachment option in email, where i can attache multiple files by pressing "attache another file" button.

 

thanks

0 Kudos
Message 1 of 7
(3,134 Views)

It depends on what data type your interested in and what indicators you are using.

 

The property nodes allow you to manipulate indicators.  You could use one indicator and then add a new row each time a button is pressed.

Property nodes.png

Lewis Gear CLA
LabVIEW UAV

0 Kudos
Message 2 of 7
(3,125 Views)

Thanks Lewis for the quick response but it is not exactly what I meant.

I added a picture with my concept.

 

I need rows with several combo box so the user can choose for each category from a drop list.

In the picture there are two rows like that.

 

Now I need that when the user press the "ADD" button another row will appear (same options different combo box) and the "ADD" button will move down under it.

0 Kudos
Message 3 of 7
(3,094 Views)

I would like to suggest something which i have earlier done.

Instead of creating various combo box controls, you can take a Mutlicolumn Listbox with fixed number of rows n col's and

programatically add rows when ever user clicks on ADD button. You can add a dropdown menu/Combobox into a specifies cell of MCLB and let the user select from dropdown list. For adding dropdown menu/Combobox into a specifies cell of MCLB refer here and here

______________________________________________
Kudos are welcome
0 Kudos
Message 4 of 7
(3,079 Views)

Thanks it's a good idea but not quit the graphic I hope to have on my gui.

 

As for the position of the "ADD" button I guess I can use the property node position, but I need each line to be separate like in my PNG file.

 

I thought of building several lines and make them invisible and each time the "ADD" button is pressed one line become visible.

But this solution doesn’t seem like the ideal one and it is not dynamic (number of rows must be known in advanced).

 

Is there a way to do it?

 

 

0 Kudos
Message 5 of 7
(3,066 Views)

@idan7*9 wrote:

Thanks it's a good idea but not quit the graphic I hope to have on my gui.

 

As for the position of the "ADD" button I guess I can use the property node position, but I need each line to be separate like in my PNG file.

 

I thought of building several lines and make them invisible and each time the "ADD" button is pressed one line become visible.

But this solution doesn’t seem like the ideal one and it is not dynamic (number of rows must be known in advanced).

 

Is there a way to do it?

 

 


If you can make that approach work you taks will be easier.

 

If not look here and chase down the various links.

 

For my model railroad

 

 

I needed to  present a different set of routing options for each of the turn-outs shown. What I did was;

 

1) Set up an array that ahd the sweet spots of each turn-out. When a user clicked the picture a swet spot would be found and the options for that routing used to fill in a ring.

 

2) The ring was populated made visable and moved to the location where the user clicked and key focus was set.

 

3) User used ring to select routing then when entered the ring was read and the hidden.

 

Have fun!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 7
(3,043 Views)

I would use a table control (edit: should have said indicator).  You can dynamically adjust the number of rows visible, and change the position of the ADD button too if necessary.  You can also show or hide the scrollbar if you need more rows than can be displayed in the window.  You can place a combox (or ring, or any other data type) on top of a table indicator to make it appear as though that control is part of the table, as I demonstrated here: http://forums.ni.com/t5/LabVIEW/array-of-cluster/m-p/1822451#M625032

0 Kudos
Message 7 of 7
(3,025 Views)