LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

underlying control shows up

Hi, I have some controls and indicators on my front panel which I want to show or hide. Because these are within an array of clusters where I change the visible elements of the array during runtime, I cannot hide or show the single controls/indicators separately using attribute nodes. This is why I use empty string controls of the corresponding size lying in the front and covering the controls which I want to hide. I control the visibility of the string controls with attribute nodes, depending on how many array elements are shown and which clusters of these elements I want to show/hide. During runtime, it happens that when I click on a point within one of the visible clusters, the controls or indicators from a cluster which is hidden under
one of these string controls shows up partly. Not the full control or indicator (with its frame and arrows), just the values become visible. Showing and hiding these clusters makes them disappear again, but the same thing happens again when I click somewhere else. This happens under LV6.02 and LV5.1.1 and is very disturbing. Is it a bug or has anybody an idea how I can avoid this? Thanks in advance, Gabs
0 Kudos
Message 1 of 13
(4,136 Views)
Not a bug, just a complication.

Try right cliking on the individual cluster element from the FRONT PANEL and select create property node.

This will let you control the attributes of the element within the cluster, rather than the whole cluster.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 13
(4,136 Views)
Ben,
sorry, but this won't work. In this way I can only control the visibility of a certain control in ALL array elements, not only in one element. During runtime, the user can select the number of elements of the array which are shown. Each element consists of controls and indicators.
To make it easy, let's assume, I have an array consisting of 2 controls. In a certain situation, I want to show 3 elements of the array, that would be 6 controls in total. But, depending on another status, I only want to show controls 1,2 (from element 1) and 5,6 (from element 3) and want to hide controls 3,4 (from element 2). This is why I use 3 string controls covering controls 1,2 (first string control), 3,4 (second) and 5,6 (third string control). For the task above, I hid
e string controls 1 and 3 and show string control 2. When I start the vi, everything is fine, controls 1,2,5,6 are visible and controls 3,4 are hidden under the second string control. Then, the strange effect that I described before happens. When I click into control 2 for instance, the numbers from the hidden controls 3 and 4 become visible.
The "real" situation is more complex than the sample described above, because I control the visibility of all controls independently. For the example above, this would mean that I want to show controls 1, 4 and 5 and hide the other 3. If only 2 elements of the array are visible, control 5 must be hidden, too. I see no other chance doing this than using overlaying elements, but if the numbers from the hidden controls become unexpectedly visible just because clicking somewhere else, this is very confusing for the user.
Gabs
0 Kudos
Message 3 of 13
(4,136 Views)
It might be a bug.

Try to make this, to see if it is the same behavious (if it is, it is
defenitlly a bug).

Make a new vi. Put a for loop in it, wire 4 to N. Put a Random Number (0-1)
inside to build a 4 element array.

Attach a number to it e.g. 15.00. Create an indicator showing the 4 rnd
numbers and 15.00.


Run it continuously. When you click inside the 15.00, and use the arrow
keys, see what happens.


Is this what you mean?

Regards,

Wiebe.


"Gabs" wrote in message
news:50650000000800000012570000-1027480788000@exchange.ni.com...
> Hi, I have some controls and indicators on my front panel which I want
> to show or hide. Because these are within an array of clusters where I
> change the visible elements of the array during runtime, I c
annot hide
> or show the single controls/indicators separately using attribute
> nodes. This is why I use empty string controls of the corresponding
> size lying in the front and covering the controls which I want to
> hide. I control the visibility of the string controls with attribute
> nodes, depending on how many array elements are shown and which
> clusters of these elements I want to show/hide. During runtime, it
> happens that when I click on a point within one of the visible
> clusters, the controls or indicators from a cluster which is hidden
> under one of these string controls shows up partly. Not the full
> control or indicator (with its frame and arrows), just the values
> become visible. Showing and hiding these clusters makes them disappear
> again, but the same thing happens again when I click somewhere else.
> This happens under LV6.02 and LV5.1.1 and is very disturbing. Is it a
> bug or has anybody an idea how I can avoid this? Thanks in advance,
> Gabs
0 Kudos
Message 4 of 13
(4,136 Views)
Hello,
I did what you suggested (see attached vi). What I see when I run the vi is, that when I click into the 15.00, the cursor occurs in the 3 rnd values, too, at the same location of the number as in the 15.00 indicator. Do you think that this is the reason for the effect: The cursor is shown in the hidden controls too and so they appear in the foreground?
Gabs
0 Kudos
Message 5 of 13
(4,136 Views)
I think I understand what you're trying to do, but I want to be sure. Could you attach a small example of this so that I can work with it?
J.R. Allen
0 Kudos
Message 6 of 13
(4,136 Views)
O.k., here it is. (comments are on the front panel)
Please let me know if you have any idea what it is or how I can avoid this. Thanks!!
Gabs
0 Kudos
Message 7 of 13
(4,136 Views)
I've looked at your example and reproduced your problem. I dont know why it happens, but looks like all the elements in an array/cluster are updated when you activate the one element. I'm not sure if it is a bug, but in this case it is undesirable.

However, i have a bit of a fix for you. Basically if you redraw the string infront (ie. by changing the background colour, then changing it back again) the control underneath only appears for an instant. This property can be found in Text>Text Colors>BG Color. You have to change it to a different colour first however, as it doesn't redraw the string if you dont, so in the example i have included i have changed it to a similar colour and also to transparent - both do the same for me).

I kno
w this isn't the best fix, but it's the best i can do at the moment...i hope it is of some use.

Kim
Message 8 of 13
(4,136 Views)
Hi Kim,
thanks a lot for your answer. I tried your vi, and it works. This is really a "workaround", in this way I can avoid the confusion that the undesired visible control numbers bring to the user. On the other hand, it is a lot of work to implement this for all the string controls in my program and makes the diagram even more complex. Hopefully, somebody from NI will read this and realize what we found out together : THIS IS A BUG!! Even if it's only a "small one", it can have some frustrating effects.

Again, thank you for your help, Kim,
and thanks also to the other users who commented on this subject.

best regards,

Gabs.
0 Kudos
Message 9 of 13
(4,136 Views)
Hello all,

This is not a "Bug". An array is a collection of like elements. Thus each element of an array is required to have the same properties as every other element. If you attempt to set a property for a single element of an array then all elements of the array must have this same property. This is true even of arrays of clusters.

Marcus Monroe
National Instruments
0 Kudos
Message 10 of 13
(4,136 Views)