LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

register drag ended event with frontpanel

Hey,

 

I tried to erase data from a listbox by drag-dropping the entry to the frontpanel. Sadly there is no way to register the drag end event to the Frontpanel (at least I could not figure out).

I wrote a state machine as a work around that was ought to register mouse out of said listbox so the drag end event can determine whether to move within the listbox or to erase the entry.Sadly, no events are handled during drag-drop is proceeding. I have some more work-arounds in mind, but they kind of displease me - so I ask:

 

*** is there a way to register the frontpanel with the drag end event? ***

 

I tried with "Reg Event.vi" and the event structure but failed as the FP does not seem to have this event at all. I think this would be useful - think of a user dropping e.g. a file on your FP instead into your file path control - you could now catch this and process it with "get drag drop data.vi".

 

I look forward to your replies.

0 Kudos
Message 1 of 10
(3,612 Views)

I don't know of a way to register the FP for drag. However, you can query the mouse position and determine what to do to dragged items. The attached example is a rough idea of how to do it.

Richard






Message 2 of 10
(3,607 Views)

Hey Broken Arrow,

 

that was exactly the solution I had in mind to work around this problem. Still, I think there should be a way to catch such an event as it seems useful, not only in my special case. Still thank you very much for your help and the VI you wrote - I would not have solved it that elegantly.

0 Kudos
Message 3 of 10
(3,596 Views)

Hi Questionmarker,

 

i researched on your request but me, i also couldn't find an alternative solution.

 

May i ask you to put your idea into the LabVIEW Idea Exchange section? You will find it here: http://forums.ni.com/t5/NI-Idea-Exchange/ct-p/ideas

 

I think, generally, this would be a good adding into the software and if this idea would be public and other LabVIEW user add Kudos on your post, the LabVIEW developer might have the incentive to add this feature for  future LabVIEW versions.

 

Have a good day,

 

Abduelkerim

Abduelkerim

Sales
NI Germany
0 Kudos
Message 4 of 10
(3,593 Views)

Questionmarker, maybe you have an idea there for the Idea Exchnage. ???

Richard






0 Kudos
Message 5 of 10
(3,583 Views)

Hello,

 

sorry for the late reply, but I was visiting the family, searching easter eggs (never found one in LabVIEW though) and all that good stuff.

I posted the idea now; feel free to kudo it as much as you want:

 

KUDO KUDO KUDO (:

 

Thanks for all the support and have a nice day!

0 Kudos
Message 6 of 10
(3,575 Views)

Hi questionmarker,

 

thanks alot for giving us ideas to make our products even better 🙂

Abduelkerim

Sales
NI Germany
0 Kudos
Message 7 of 10
(3,572 Views)

I don't know if this is always consistant but in Broken Arrows example the Drop event fires before the End Drag even.  You can put this info in a shift register and on end drag even determine what to do without having to know where the mouse is.  See modified VI

0 Kudos
Message 8 of 10
(3,549 Views)

Hi Pauls, thank you for your post.

I could not understand what you mean. Can you please explain it again?

Abduelkerim

Sales
NI Germany
0 Kudos
Message 9 of 10
(3,537 Views)

Compare the VI that Broken Arrow posted and the modified version that I posted.  You'll see the difference.

 

What I don't know is if it is universal that the "Drop event" will always fire before the "end drag event".  It did for me in the example VI I posted which simplified the code a bit.

0 Kudos
Message 10 of 10
(3,527 Views)