07-28-2014 04:16 PM
So what happens if you use a property to make it Modal, same effect?
/Y
07-29-2014 12:00 AM
Yes, same effect
07-30-2014 09:57 AM
Hi KJmaster,
Have you tried implementing a state machine in your code? It sounds as though this may help you accomplish what you want to do. Here are some articles on state machines and how to use them.
http://www.ni.com/white-paper/3024/en/
http://www.ni.com/white-paper/7595/en/
Within the state machine you can use a property node to disable the controls until after the stop button or another event has occurred. You can disable the controls, disable and gray out, as well as make them disappear completely. Here is a community example and a forum discussion on disabling controls using a property node.
http://forums.ni.com/t5/LabVIEW/disabling-controls-on-front-pannel/td-p/723072
I hope this helps!
Best Regards,
07-31-2014 03:11 AM
Hi rkm44
disbaling the control, disbaling and grey and even making it invisible is no good. it still captures the mouse down event.
I don;t understand how state machine has anything to do with a solution.
Thanks
07-31-2014 04:19 AM - edited 07-31-2014 04:23 AM
OK, i reviewed your situation and dynamic event registration is the key for solving your issue.
Challenge is that LV behaves a little different to expectations when de- and then re-registering the event:
The event re-registration has to be done in a different event case other than the one which de-registers the event!
In your case, the code requires the following changes:
The code will look similar to this event case, without the disable structures of course (i left them for showing where NOT to place re-registration!):
Norbert
EDIT: Improved code shown in screenshot
07-31-2014 05:52 AM
you are the man!
indeed I see that as you said that the dereg has to be down in the "mouse down" event and the reg on "timeout"
thank you very very much for that solution.
it works!
07-31-2014 05:59 AM
Just to add something "professional":
I wouldn't go for the timeout event case. This is somehow the "last resort" to solve this.
For a better sophisticated application, i would introduce a user event which is fired once the popup dialog is acknowledged/canceled. That user event would be used in the caller event structure to re-register the mouse down event.
This is of course is a more complex and worksome implementation, but is better in terms of "event based execution".....
Norbert
07-31-2014 06:08 AM