Jonathan Borduas Posted December 24, 2010 Report Share Posted December 24, 2010 Hello, I try to detect the following action in edit mode: I took control and moves over an xcontrol and then I released. Note that in my program, it must be the Xcontrol that detects the action. So I tried with the mouse up event, but since it happens on the control moved, the mouseup event is not triggered. After trying several strategies that have not given the desired results. Jonathan Quote Link to comment
ShaunR Posted December 24, 2010 Report Share Posted December 24, 2010 Hello, I try to detect the following action in edit mode: I took control and moves over an xcontrol and then I released. Note that in my program, it must be the Xcontrol that detects the action. So I tried with the mouse up event, but since it happens on the control moved, the mouseup event is not triggered. After trying several strategies that have not given the desired results. Jonathan Have you tried the Drag/Drop Events? Quote Link to comment
Jonathan Borduas Posted December 24, 2010 Author Report Share Posted December 24, 2010 Have you tried the Drag/Drop Events? I'm not familiar with these events, I thought they were for drag/dropping data. Quote Link to comment
Yair Posted December 24, 2010 Report Share Posted December 24, 2010 I don't know if the drag events will work or not, but if not, I think you might have to do this with polling. You can use the initialization of the XControl to spawn a running VI which will use the mouse input VIs to monitor whether the mouse button is released when the VI is front most and the cursor is over the XControl. I'm assuming that if you grabbed a control, you will be able to get a reference to it using the panel's Selection List[] property. You can use the uninit code to destroy the process. See here for a similar topic - Quote Link to comment
Jonathan Borduas Posted January 6, 2011 Author Report Share Posted January 6, 2011 I don't know if the drag events will work or not, but if not, I think you might have to do this with polling. You can use the initialization of the XControl to spawn a running VI which will use the mouse input VIs to monitor whether the mouse button is released when the VI is front most and the cursor is over the XControl. I'm assuming that if you grabbed a control, you will be able to get a reference to it using the panel's Selection List[] property. You can use the uninit code to destroy the process. See here for a similar topic - http://lavag.org/top...-in-an-xcontrol Thank you, it is working great ! Jonathan Quote Link to comment
Yair Posted January 6, 2011 Report Share Posted January 6, 2011 Sounds good. Do you have a simple example you can upload? It might help someone else in the future. 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.