LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unregister from UI events?

Hello,
 
I wonder if it is possible to "unregister" the event structure from querying the UI events once the VI is no longer interested in interacting with user? For example, a VI might have to run clean-up code for extended time outside the "while/event" structure combo after the user have pressed "Stop" button. If the user continues to interact with UI objects, it would cause the UI lock-up if the "Lock front panel" was checked for the particular event cases and may cause "user panic" or just feel "unclean".
 
Fedor.
0 Kudos
Message 1 of 2
(2,481 Views)
Good question. Some answers:
  • Simple answer: NO, you cannot programmatically unregister a statically registered UI control with the event structure. Once it's statically registered (with the register events dialog) it will always respond to UI events until the VI is done.
  • You can however dynamically register your UI controls. Then you have the option to either unregister the controls by executing the Register for events node with a null reference (on a per control basis), OR execute the Unregister for events node.
  • Another option is to disable the front panel controls with the disable property after you click the stop button so you don't have to worry about events firing.


Michael Aivaliotis
VI Shots LLC
Message 2 of 2
(2,475 Views)