04-04-2012 04:06 AM
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.
04-04-2012 12:52 PM
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.
04-05-2012 03:28 AM
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.
04-05-2012 03:59 AM
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
04-05-2012 09:07 AM
Questionmarker, maybe you have an idea there for the Idea Exchnage. ???
04-10-2012 03:02 AM
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:
Thanks for all the support and have a nice day!
04-10-2012 03:14 AM
Hi questionmarker,
thanks alot for giving us ideas to make our products even better 🙂
04-12-2012 11:39 AM
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
04-13-2012 03:35 AM
Hi Pauls, thank you for your post.
I could not understand what you mean. Can you please explain it again?
04-13-2012 07:32 AM
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.