Jim Kring Posted February 3, 2007 Report Share Posted February 3, 2007 I am looking for a cross-platform way to programmatically cause a context menu to appear for a front panel control. Any solution? Thank you, Quote Link to comment
Jim Kring Posted February 7, 2007 Author Report Share Posted February 7, 2007 I am looking for a cross-platform way to programmatically cause a context menu to appear for a front panel control.Any solution? Thank you, Any takers? I guess that everyone is just as stumped as I am. Quote Link to comment
Tomi Maila Posted February 7, 2007 Report Share Posted February 7, 2007 Any takers? I guess that everyone is just as stumped as I am. My guess is that you cannot do it via LabVIEW. The best suggestion I can give is to use dialog windows to mimic context menus. I've to face this same problem in a few weeks as I'd like to activate the context menu when user clicks the left button, not the right one. Tomi Quote Link to comment
PJM_labview Posted February 7, 2007 Report Share Posted February 7, 2007 ...I've to face this same problem in a few weeks as I'd like to activate the context menu when user clicks the left button, not the right one.Tomi Actually, activating on the left click instead of the right is fairly easy. If you use the "mouse down?" filtering event you can dynamically tell LV which button has been clicked (see image below). So far, the trick for dynamically firing the menu activation event would be to be able to dynamically fire the "mouse down?" event. If we could do that, the other part is easy. PJM 1 Quote Link to comment
JDave Posted February 8, 2007 Report Share Posted February 8, 2007 So far, the trick for dynamically firing the menu activation event would be to be able to dynamically fire the "mouse down?" event. If we could do that, the other part is easy. I have occasionally wanted to do exactly that, programmatically fire a built-in (non-user) event. This would be very interesting and useful, but I would imagine it would require a lot of care and know-how on the developers side to use it correctly and not cause bad side effects. Quote Link to comment
ragglefrock Posted February 12, 2007 Report Share Posted February 12, 2007 QUOTE(dsaunders @ Feb 7 2007, 06:45 PM) I have occasionally wanted to do exactly that, programmatically fire a built-in (non-user) event. This would be very interesting and useful, but I would imagine it would require a lot of care and know-how on the developers side to use it correctly and not cause bad side effects. You can cause notify event cases to execute programmatically by creating User Events whose data type masks the event data itself. For instance, for a Mouse Move event, you could create a User Event with a cluster containing a Ctrl refnum, Coordinates cluster, etc. If the data matches up exactly, you can register the event case for the User Event alongside the notify event. Note, though, that generating the User Event only causes the Event case to execute, not the other registered event (like moving the mouse). You also can't mask filter events like Mouse Down? with User Events. Quote Link to comment
Tomi Maila Posted February 12, 2007 Report Share Posted February 12, 2007 QUOTE(ragglefrock @ Feb 11 2007, 03:43 AM) You can cause notify event cases to execute programmatically by creating User Events whose data type masks the event data itself. For instance, for a Mouse Move event, you could create a User Event with a cluster containing a Ctrl refnum, Coordinates cluster, etc. If the data matches up exactly, you can register the event case for the User Event alongside the notify event. Note, though, that generating the User Event only causes the Event case to execute, not the other registered event (like moving the mouse). You also can't mask filter events like Mouse Down? with User Events. Thanks, this is an interesting trick. However it doesn't solve the problem of genereting system events, only allows to handle system events and user events in the same event case. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.