LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure: lock panel option

Highlighted
I do not understand the "lock panel" option of the event structure.  In the attached VI, the front panel still seems to queue the front panel events when one repeatedly clicks the "trigger event" button while the event is still being processed. I also tried disabling the control via property nodes, but that did not help. How can I really block user interaction with the front panel during an un-finished event?
 
Dirk
0 Kudos
Message 1 of 4
(956 Views)

Hi Dirk,

This is intended behavior, as per the LabVIEW help:

When you enable this option, LabVIEW temporarily defers processing of mouse clicks, key presses, and other user actions on that front panel while the event case executes, then processes the pending actions in the correct order after the event case finishes execution.

The lock front panel option prevents the user (and the program) from affecting controls until the event completes, but it still queues up the user's clicks, as you generally don't want to discard events from the user (for example, if you have a switch, and you hit the switch with this option enabled, the switch won't actually change value until you finish processing your event).
 
Would disabling the control with a property node work?  I modified your code to do this and attached it.  One note is that if you use this approach, you need to turn lock front panel off, otherwise the disable won't take effect until after the event has been processed.
 
Hope that helps,
Ryan K.
Message 2 of 4
(927 Views)

Hi Ryan,

thank you, that did it! When I tried the property node before, I did not un-check the "Lock panel" option, so the panel was already blocked before the boolean was disabled. Perhaps this helps me also with some of the problems I had when I tried to use more complex event handling on a table control.

Thanks again!

Dirk  

0 Kudos
Message 3 of 4
(914 Views)

Glad that helped.  This example demonstrates some fairly complex event handling with a table:

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=D5280FD27094294AE034080020E74861&p_...

 

Regards,

Ryan K.

0 Kudos
Message 4 of 4
(900 Views)