From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disabled FP buttons if press by mistake hang the execution

Solved!
Go to solution

Hi forum,

 

I am working on a program that enables and disables 2 buttons in the FP for the user upon certain conditions. Once the disabling condition is met, both controls in the FP are disabled. If I keep working on the  the UI the execution is flawless, but if by mistake one of these  disabled (and grayed out) buttons are pressed (clicking on where they are visible in the FP) the program responds no more. Aren't these disabled?

 

Anybody faced something like this? I am using LV2015.

0 Kudos
Message 1 of 5
(3,184 Views)

It's better to attach VI or snippet of the program.

-If your program is too big, simplify and recreate and post.

Thanks
uday
0 Kudos
Message 2 of 5
(3,180 Views)

Uday,

 

here is a snippet. The upper part shows the VI I call to disable these two buttons (a Continue and Abort buttons). it is the third VI in the Init case shown. The snippet below is such VI showing the code for the cases wired as inputs (Disable |  Abort/Cont). Hope this helps.

 

Thanks

 

Jose

 

0 Kudos
Message 3 of 5
(3,170 Views)

So I guess my question is if disabled and grayed out buttons still repond to event structures, as I highlighted the execution for menu buttons I am also disabling and saw that the event is triggered regarless of the control state? I am not using the same control in more than one event structture in the program as I know it will trigger the malfunctioning. It is triggering it when disabled.

 

-j

0 Kudos
Message 4 of 5
(3,144 Views)
Solution
Accepted by topic author JoseRivero

I think I've found what was causing this. The event structure where the events for the disabled buttons are handled need to have the Lock Panel checkbox unchecked in every case so the events occurring while you are actually not  purposely using your controls for are not deferred.

 

Thanks

 

-J

0 Kudos
Message 5 of 5
(3,131 Views)