LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the number of items displayed on the screen based on user input

I need to place a number of input clusters on the user's screen based on the number of input types he will have.  Is there an easy way to do this?  (Say I have 3 different electrodes, I want to be able to add information for each then take this information and add it to a database, this case adding three new record sets to the database.  If I only have one electrode though, I only want one cluster on the screen and only one recordset will be added to the database)

Message Edited by Vitamin on 01-11-2007 12:36 PM

0 Kudos
Message 1 of 17
(4,870 Views)
Put the cluster in an array container and selet how many array elements to show using a property node.
 
Do the saving in a loop, autoindexed by the array of clusters, for example.

Message Edited by altenbach on 01-11-2007 10:55 AM

Message 2 of 17
(4,860 Views)

Place your clusters in a 1D array and create a property node for the array. You can use the Number of Rows property to control how many elements are shown. Wire the array into a for loop to index it.

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
Message 3 of 17
(4,858 Views)

Christian wrote

"

Put the cluster in an array container and selet how many array elements to show using a property node.
 
Do the saving in a loop, autoindexed by the array of clusters, for example.

"

And at the same time tst was writing

"

Place your clusters in a 1D array and create a property node for the array. You can use the Number of Rows property to control how many elements are shown. Wire the array into a for loop to index it.

"

You guys are freaking me out! Smiley Tongue

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 17
(4,851 Views)

Well, what would you write?

Anyway, note how Alten only wrote that simplistic answer and how I also took the time to do some research and add all kinds of links. Smiley Very Happy


___________________
Try to take over the world!
Message 5 of 17
(4,844 Views)


@tst wrote:
... I also took the time to do some research and add all kinds of links.

Really? I thought that stuff was part of your signature. 😮
 
(One of these days, we're going to give the same wrong advice at the same time... ;))
Message 6 of 17
(4,838 Views)
Do you have any idea how long that takes to type each time (not to mention finding the links)? Smiley Very Happy

___________________
Try to take over the world!
Message 7 of 17
(4,826 Views)
I understand the concept of using arrays but am unsure of how to get them to show a variable number of elements.  I have the cluster created on the front panel... do I add it to an array created on the front panel or into one created on the block diagram... it still frustrates me that these can be very different things...  One thing I did notice is that if I add my cluster to an array on the front panell and then hit the up/down arrows to get to say 5, still only one element shows when I run the program.  The only way I've been able to increase the elements viewed is to physically drag the corner of the array to create new elements.  I also tried using the initialize vi on the block diagram which lets you set the number of elements but that seems just to work to add indicators instead of controls, which is what I need.  Any further suggestions?  Thank you for your help!
0 Kudos
Message 8 of 17
(4,742 Views)
  1. Right click the array on the front panel.
  2. Create -> Property Node -> Number of Rows.
  3. Place the created property node on the block diagram.
  4. Right click the Number of Rows property and select "change to write"
  5. Connect an integer to this property that contains the number of elements you want the user to see.
  6. Read all the links Altenbach posted. As you are new to LabVIEW, there is a lot of good information there for beginners.
Message 9 of 17
(4,737 Views)
Thank you all very much!
0 Kudos
Message 10 of 17
(4,733 Views)