LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Grayed-out buttons during run-time

Hi,

In Labview, is it possible to cause a Front-Panel control to be
grayed-out and disabled during run-time due to another control being
activated. My VI is used for board control/configuration, and has
several different modes of operation. If I select a certain mode, I
would like all controls not related to that mode to be grayed-out and
disabled.

Thanks in advance,

Derek.
Message 1 of 23
(16,207 Views)
Yes. Create a property node for the control and select the Disabled property. Right click the property node and select Change to Write. A zero value wired to it enables the control, 1 disables it, and 2 disables and grays it out. In some versions of LabVIEW, the property node is called an attribute.
Message 2 of 23
(16,207 Views)
Create a property node for any control you want to disable.
Right-click on control and select Create >> Property Node.
Right-click on the property node and select Change To Write.
Right-click on the property node and select Properties >> Disabled.
Wire the following constant to the property node, depending on what you want to do:
0 = Enabled
1 = Disabled
2 = Disabled and grayed out
Don't forget to enable again at some point. You may want to initialize you controls to some default enabled/disabled state when you start your program.
Message 3 of 23
(16,207 Views)
I often find that I want to do this to a bunch of front panel controls when a give process starts / stops. A nice way to group them is to create an array of references (during an initialization step for example) of all the controls to gray out, then feed that array to a subvi that performs the same operation on each reference. Please see the attached vi's and post back if you have questions.

~ Tim
Download All
Message 4 of 23
(16,207 Views)
Al S wrote in message news:<50650000000500000000C70000-1042324653000@exchange.ni.com>...
> Create a property node for any control you want to disable.
> Right-click on control and select Create >> Property Node.
> Right-click on the property node and select Change To Write.
> Right-click on the property node and select Properties >> Disabled.
> Wire the following constant to the property node, depending on what
> you want to do:
> 0 = Enabled
> 1 = Disabled
> 2 = Disabled and grayed out
> Don't forget to enable again at some point. You may want to
> initialize you controls to some default enabled/disabled state when
> you start your program.

Thanks, guys, for the quick replies. Much simpler to do than I thought
(slightly embarassed!), but my fro
nt-panel is much-more user friendly
now.
0 Kudos
Message 5 of 23
(16,207 Views)
can someone convert to 6.0.2 please

Thanx, Paul.S
0 Kudos
Message 6 of 23
(16,207 Views)
Here are the files in 6.0
Download All
Message 7 of 23
(16,207 Views)
thanx blimpieboy

Paul.S
0 Kudos
Message 8 of 23
(16,207 Views)

How can I make controls enabled when I stop the program from front panel? They are always grayed out now.

0 Kudos
Message 9 of 23
(15,101 Views)

Hello,

 

         Enable all buttons outside main loop, so when you run your vi, even if your buttons were disabled, it will be enabled. other operations remains the same

Thanking you,
Sushmith
0 Kudos
Message 10 of 23
(15,098 Views)