LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Repeated Interface Elements-Best way to approach

Solved!
Go to solution

What is the best way to repeat a group of interface elements N times?

 

 

Right now I am using an array of clusters, but that does not work very well because the property nodes are all identical for each element in an array. In this case different scales and range restrictions are needed on the different elements. I understand it is feasible to manually code equivilent behavior, but it seems a bit of a cludge. Is there a "right way" to do this?

0 Kudos
Message 1 of 6
(2,331 Views)
Solution
Accepted by topic author ngarneski

A little more detail would be needed.  Is N fixed, do you have to show all N at once.

 

Often the best solution is to decouple the data from the user interface, that is to store the data as an array of clustres but present the data to the user for interaction as a single element or a cluster of clusters of a fixed window of elements populated from the array.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 6
(2,324 Views)

From what yo have posted I'll suggest using a sub-panel to host the details that are unique. Users selects which widget to poke at and the sub-panel for that type of widget is shown.

 

Ben

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

Hi,

I'm not too sure what you want to improve, an array of cluster seems to be a good solution in some cases. Are you trying to improve the code behind or more the user interface?

Can you show your fornt panel and if needed also the code behind that you'd want to improve?

I'm not too sure what you mean with the"identical property nodes"...


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 6
(2,321 Views)


I'm not too sure what you mean with the"identical property nodes"...


At least as I understand it the properties of all elements in an array are the same. So if you set the increment property on a numeric control in an array, then it will apply it to all the numerics. I need to be able to initialize slides, numerics and other controls with different increments, min values and max values.

  Is N fixed, do you have to show all N at once.

N is fixed once the VI is initialized. It will load in the data from a configuration file. I do not need to show them all at once, but it would be nice to show several. The array of clusters with the side scrollbar looks right in that sense. Ill try playing around with clusters of clusters for display with the array backend I think that may be the right way to go.
0 Kudos
Message 5 of 6
(2,306 Views)

" I do not need to show them all at once, but it would be nice to show several. "

 

This may be the key. Separate the storage and internal usage of the data from the display as Paul said.  Use the best option for each and convert as necessary.

 

An array of clusters may be the best internal storage. Include controls for the initial values, scales, and limits as needed.

 

Set up the User interface in a way that makes sense for what the users will be doing. Use property nodes to set the scales and increments. Perhpas add a string indicator so you can let the user know which group is active.  Other options include listboxes and sub-panels as Ben mentioned.

 

Lynn

0 Kudos
Message 6 of 6
(2,298 Views)