LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to cusotmize a control to cover other controls?

I like to create an array in which can place several controls by using an cluster-array. Since the attributes hide an so on work on all rows in the array, I wanted to make one control (boolean) which I can switch on and off (as a control), which actually covers other controls when switched on. So disabling control over it. But ... whenever I tried to customize a boolean and choose independent size, my idea works well in the customizing window, but the control works/show different back in a vi. Than I saw it works within a cluster, but whenever I move it into an array it does not work. Can anyne advise? It is merely a cusotmised control and should work in arrays as well.
0 Kudos
Message 1 of 12
(3,803 Views)
Hello,

Thank you for contacting National Instruments.

I spent a considerable amount of time playing with and trying to interpret your VI. I think I understand what you are trying to do, but it does not appear that you are using the same custom control in your array that you are using in the example that works.

What version of LabVIEW are you using? Try using a simpler custom control in an array, and see if that works first.

I am curious to know why you are trying to hide individual controls within an array. I cannot imagine an application where this would be beneficial. If you think of an array as a collection of data, they are not inherently designed to organize a user interface. You may want to consider placing each boolean control separate
ly outside of the array and using property nodes to enable/disable them individually.

Let me know if this would work for you.

Matthew C
Applications Engineer
National Instruments
0 Kudos
Message 2 of 12
(3,803 Views)
Indeed, I am using an array for frontpanel purposes. Addressing all seperate controls, is a lot of code, and selection to choose the right attribute of the right control. I seem to have two rather interesting cases here: 1) why is the behaviour of a customizes control with independent sizes different, in customizinf window versus in the vi? 2) why can I get this to work into a cluster (see point 4 in vi), but doesn't it work in an array anymore (zie point 5)
Attached is another example in which I also sho how I builded up the example.
0 Kudos
Message 3 of 12
(3,803 Views)
Sorry, forgot to report: labview 6.1
0 Kudos
Message 4 of 12
(3,803 Views)
In applications with many controls (measurement applicaitons) many times is is a punishment to have to address largenumbers of attribute to (un) hide controls. We are looking for a way to supply an list of number e.g. control order, and to (un)hide those controls. The alternatives are many casestructures with lists of attributes which have to be wire all seperately. So the question actually is: can we (un)hide large numbers of controls programmatically bij supplying numbers or an array with names?
0 Kudos
Message 5 of 12
(3,803 Views)
We found an alternative (the question on difference in behavious still stands). We found a nice workaround by collecting the names of all controls on the front panel. Bij using smart naming, we now can change visibalitiy of groups of controls bij changing the attribute visible to all the reference, which we collected, with a certain name. For example: i have a tab control with on each tab a number of groups (show bij lines. In those groups a number of controls are displayed. Each group stand for a certain measuring function. If measurement C is not used an we name evering from measurement C something like C_capvalue, C_speed, C_drivespeed etc, we simply can change the attributes for controls with names starting with C_
The LLB I have attached was downloaded
a while ago somewhere from the internet is using propery nodes.
(my excuses to the author, I do not have his/her name)
0 Kudos
Message 6 of 12
(3,803 Views)
Hi,

Each element in an array only differs in data. So if you change the look,
data representation, or anything else that is not data, each element will
change.

Regards,

Wiebe.

"isharryf" wrote in message
news:50650000000800000065DD0000-1079395200000@exchange.ni.com...
> I like to create an array in which can place several controls by using
> an cluster-array. Since the attributes hide an so on work on all rows
> in the array, I wanted to make one control (boolean) which I can
> switch on and off (as a control), which actually covers other controls
> when switched on. So disabling control over it. But ... whenever I
> tried to customize a boolean and choose independent size, my idea
> works well in the customizing window, but the control works/s
how
> different back in a vi. Than I saw it works within a cluster, but
> whenever I move it into an array it does not work. Can anyne advise?
> It is merely a cusotmised control and should work in arrays as well.
0 Kudos
Message 7 of 12
(3,803 Views)
Thanks for your answer.
I do know now that only data can be changed per element. I tried using this by using one boolean in the cluster to cover/hide others controls. As you might have seen in my seconde example this works fine within a cluster, but why not in an array. As you described, I can change the value of the boolean seperately. And eacht booleans has two graphical presentation (depeding on state). Why does this not work in this array? More interesting, why does a boolean with indepent size betwee on/off in the customizes window behave different from the presentation of that control back in the VI?
0 Kudos
Message 8 of 12
(3,803 Views)
Hi,
I think there is an easier way to hide and show controls. You can get a list of all controls that you are using in a particular user interface. You need a reference to the VI, then get the reference to the controls array, and then on each control you can access each property, like hide or show it, change the position, etcetera. I have attached a VI which shows this.

ErikvH
Applications Engineering
National Instruments
0 Kudos
Message 9 of 12
(3,803 Views)
Thanks Erik, I recently came to this solution too. This works fine with us. Thank you anyway.
0 Kudos
Message 10 of 12
(3,803 Views)