LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with disabled button

Hi all, i found out that user could still press disabled and greyed out buttons in front panel. Is this suppose to be the case? It actually pose some minor risks to my program though. Is there anyway to disallow them to press it as well. Thanks.
0 Kudos
Message 1 of 4
(2,992 Views)
Hi!

I got a little confused about what you wrote, what the buttons still where enabled then i disabled mode.
So i did a little test VI, see attachement (LV 6.1).
As long as the VI is in execution mode (running) you can't press the button if it is in "disable" or "disabled & greyd" mode. But then it stop executing you'r able to change the value of the control.

/Thomas
0 Kudos
Message 2 of 4
(2,992 Views)
Hi,

You are probably using the event structure. An event "mouse down" is
genetared when a button is pressed, even if the button is disabled (and it
should, because the mouse *is* down on it).

You should use the "value change" event. This is only generated when the
value is changed, and this doesn't happen is the button is disabled.

Regards,

Wiebe.

"lihui" wrote in message
news:50650000000800000047C70000-1079395200000@exchange.ni.com...
> Hi all, i found out that user could still press disabled and greyed
> out buttons in front panel. Is this suppose to be the case? It
> actually pose some minor risks to my program though. Is there anyway
> to disallow them to press it as well. Thanks.
0 Kudos
Message 3 of 4
(2,992 Views)
Hi Lihui,

Users should not be able to press disabled and greyed buttons on the front panel if the VI is running. However, if the VI is running and a user is able to press the button please post a simplified piece of code that shows this functionality.

Have a great day!
Brooks W.
National Instruments
0 Kudos
Message 4 of 4
(2,992 Views)