LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make visible or invisible numéric on array of cluster

Hi!

I have an array of cluster. Each cluster contains four controls (numeric1, boolean1, pop-up menu1, numeric2).

According to the value of the boolean1, I want to make visible or invisible numeric2.

This on each cluster of the array and independently for each cluster

Is this possible?

Thanks
0 Kudos
Message 1 of 7
(3,598 Views)
The answer is yes and no.

It is possible to make different controls in a cluster visible and invisible.

However, that is not the same for arrays. An array is a collection of items with the ONLY differnce being value. So all the properties of every element must be the same. You can programaticaly change the properties of the array element, but notice it is element. An array does not have a collection of elements it has 1 element and a bunch of values. Imagine the memory that would be needed if every single property of every index needed to be stored.

So you could make all of the numeric1 controls invisible, but it will be for every cluster. You can not make it visible at index 1 and invisible at index 2.
0 Kudos
Message 2 of 7
(3,575 Views)
Hi TwentyUno

One possibility (providing you don't require large amounts of array elements !) is to define your cluster and then take multiple copies rather than use an array. Then use an array of cluster references to simplify the control process as shown in the attached VI.
It's not ideal but it might be a solution.

Good luck
Neil

Message Edited by NeilR on 03-09-2005 09:40 AM

Message 3 of 7
(3,570 Views)
Since the cosmetic of controls in an array must be identical for all of them, you can't selectively hide cluster elements using property node. That will affect all elements. The solution would be to show only one element at a time.

The only thing different from element to element is data content. Using a boolean control, you can change its appearance and its size depending of its value. The trick is to make a boolean that is small and transparent when false and large and opaque when true. When true (large), the boolean can overlap and hide other parts of the area.

Unfortunately LabVIEW is buggy when dealing with such booleans with different sizes. Try to put the attached boolean on a FP and the relative offsets of different true
/false piceture are messed up.


LabVIEW, C'est LabVIEW

0 Kudos
Message 4 of 7
(3,557 Views)
OK, thanks for tour help.

@+ twentyuno
0 Kudos
Message 5 of 7
(3,530 Views)
OK thanks for your help, it is well running.

@+
0 Kudos
Message 6 of 7
(3,524 Views)
If you don't need to interactively change the control/indicator you are hiding, you can put a color box over it. When you want to show it, make the color box transparent. When you want to hide it, make the color box the same color as your background. Make the edge transparent. Or customize the 3D control and replace the border with a transparent one.
This account is no longer active. Contact ShadesOfGray for current posts and information.
0 Kudos
Message 7 of 7
(3,514 Views)