on one page the user can set the amount of test samples, which is realized within one event loop (within a while loop).
(sorry for not posting the VI as it contains WAY much more code, which is not relevant)
dependent from that number I'd like to show only the respective amount of input lines.
I've realized this by a case structure, but I'd like to have that for up to 20 Inputs, which would result in a rather big case structure.
I'm sure there is a way more elegant solution (?)
LV 2015 Sp1
Solved! Go to Solution.
instead of using lots of string controls you could use a string array-type (array, table)…
I thought about the same but gut struck on how to show only part of the array
how do I show only part of the array dependent of the user input?
Arrays have Properties. The Property "IndexVals" can be used to set the initial Index that appears in the upper left corner of the displayed array (so if you want the first Row, which would be Row Index 0, you would take "1", decrement it, convert it to a 1x1 array using Build Array, and wire it to the IndexVals property), as well as "NumRows", the number of rows you want visible.
Hi Bob Schor,
that's why I love this Forum:
as allways: anybody found a good solution 🙂
Thanks for your tip regarding the Property notes, that was the setting I was searching for.
unfortunately I didn't understood your Idea regarding the IndexVals.
Yes, I want every line to have a different label (if that's possible)
here instead of "String 2" on every line, Value 1, Value 2, ...
following Idea don't work:
basic rule: in an array ALL elements share the SAME properties!
So all elements will have the same label/caption!
Create an array of cluster. Eacu cluster contains a string (which displays your label) and another string for the user input…
(Hint: you can set this "label" string control to "disabled", so the user cannot change its content.)
The IndexVal property determines which array element is shown as the first visible element. (Example: your array might have 10 elements and you want to show element 2 to 6: IndexVal=2, NumOfRows=5.)