Jump to content

detecting when a control is drop over an Xcontrol


Recommended Posts

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

Link to comment

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?

Link to comment

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 -

Link to comment
  • 2 weeks later...

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.