LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graying a button till it is clicked

I am aware of the "Enable", "Disable" and "Disabled and grayed out" attributes, but for my particular application I would need putting this into a while loop and it would be a mess to synchronize it with the rest of the program.

 

What am looking for instead is a simple way of graying out a cluster of controls in the front panel, but once the user starts modifying ANY control in that cluster, the whole cluster should be 'non-grayed'. Is there any simple way to do this without having to do the classical property node - switch - while loop stuff?

0 Kudos
Message 1 of 4
(3,026 Views)

I'm not sure that I understand your question.  If the cluster of controls is grayed out, you won't be able to start modifying them.  They are disabled.  Can you post an example of what you are trying to do?

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 4
(3,020 Views)

It was probably 15 years ago when I asked NI to add a fourth option: "Enabled and greyed out", but it was argued that a greyed out control should not be changeable by the user.

 

What you could do is place the cluster control inside an array container (hide the index terminal) and start out with an empty array. The element (i.e. the cluster) will be greyed out if the array is empty, but as soon as you modify any part of the greyed out cluster, it will turn into an array with one valid element and it will no longer be greyed out.

Message 3 of 4
(3,015 Views)

You should also be able tu use "mouse down" events. They don't care if something is inoperable (disabled&greyed or even an indicator etc.) then enable the control if the event occurs. You might need two clicks thought: One to enable and one to modify. Then you would also need to revert to greyed if no actual change took place, etc.

0 Kudos
Message 4 of 4
(3,002 Views)