‎11-02-2009 02:55 AM
hi, I have a mouse down event for pushbutton on the front panel to trigger an event. The event structure is under a while loop. However, I checked 'lock FP during the process' but the pushbutton actually registers the mouse click. i.e. once i click the pushbutton during the event(which is supposed to be locked), the event will be triggered again automatically after the current round.
Does anyone know how to fully lock the button? I even add in property node to disable the button in the beginning of the event case but it doesn't work as well.
Thanks a lot.
Cheers,
SSR
‎11-02-2009 03:42 AM
‎11-02-2009 03:58 AM
‎11-02-2009 04:07 AM
Hi SSR,
Maybe what would work better would be to not use the mouse down event at all. Use a Value Change event and in that event disable the button with a property node. Then enable it again when you want to accept user input.
steve
‎11-02-2009 04:29 AM - edited ‎11-02-2009 04:33 AM
Hi,
The option is to 'Lock the front panel until the event case for this event completes'. If you have this checked, then all other controls are locked until the event triggered by the mousedown completes. It does not prevent the event from registering in the first place. The mousedown will still register and it's event code will execute regardless if this checkbox setting (unless another event is being processed at the time).
Mousedown also registers if you disable the control either programatically or via the menus - you need to change the event to 'Value Change' instead of Mouse Down. If you do this and programatically alter the enabled stated of the control, you can control whether the event is processed or not.
HTH
Steven
edit: stevem181 beat me to it and in fewer words too
‎11-02-2009 04:33 AM
Disabling the button wont help if the event trigger is mouse down. The mousebutton will still be pressed and generate more events.
Use Value Change event for the button, it's alot easier. 🙂
/Y