08-08-2016 09:46 AM - edited 08-08-2016 09:49 AM
Did anyone notice the LIstbox Drop Enter event doesn't always work if the event structure is edited. This is second time where I've edited the event structure by adding a case and the Listbox events do not fire although they are unchanged. I observed this using the Event Inspector Window. I've always enabled Drag & Dropping Outside of Control (default) and also Allow Dropping. But now these properties don't make a difference since I persistently get the circle with a slash icon whenever I attempt to drop text into the Listbox. Using LV2014, has anyone notice this... I can't find a way to work around this since drag & dropping is important step in the automation.
Rich J
08-09-2016 02:03 PM
Upon further ananlysis, I tried the NI example "Drag and Drop Initiate a Custom Drag.vi" and IT DID NOT work! It worked in the past. I kept getting the circle with the slash icon upon drag. I then opened the other Drag Drop NI example "Passing Custom Drag Data.vi" and THAT WORKed! I then went back to the original NI example "Initiate a Custom Drag.vi" and now that worked too, wow! I ran my development code and now the Event fires Drag Enter and Drop, after 2 days of turning over every stone to track the problem.
This is a bug, I don't know how its reproduced. I'm wondering do I use the "Passing Custom Drag Data" or the "Initiate a Custom Drag" BD into my project code, or does it matter?
Rich J
Rich J
08-09-2016 03:36 PM
I had a few similar questions:
And the final solution was to wire through the Data and append to it if needed:
I'm not sure if this the problem you are running into or not but there are sure some odd things when performing drag and drop.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-10-2016 08:41 AM
Hooovahh, thanks for the link, lots of useful info, it identifies my problem at the least.
Similar to your code, I used the Register for Events to set Drag & Drop (actually all events using a subVI). I added too or changed the Event structure but did not change the Drag Drop case, yet the Drag Drop did not fire. I'm assuming you use the Event Inspector Window when troubleshooting correct? Inspector doesn't tell you when or if data is being lost, just what event occur. I'm not using the Start Drag Event therefore I don't have a Data Items terminal on the RHS of the Event Structure.
My problem is partially fixed. I use Mouse Leave with an Invoke Drag Start Method to fire the Drag Enter and now that miraculously works again as I mentioned above. Here's what is still broken, I used Mouse Down and Mouse Up Events to reorder text in a Listbox, these Event no longer fire. Instead the Drag Enter Event fires when I click n drag on a Listbox item to reorder the list. When I release the mouse to the new dragged item order, Drop Event fires. In other words, Mouse Down and Mouse Up no longer works when I click and drag inside a Listbox item to a new location in the Listbox (to change the list order). I did nothing to explicitly break this but the Mouse Down Mouse Up Events worked previously when I dragged drop totally inside the Listbox control. Question is how do I fixed this and make it persist.
08-10-2016 10:22 AM
I've fixed my problem with the Drag Event firing (and not Mouse Up) for the Listbox. I broke my BD customized reordering items in a Listbox by enabling "Allow Dragging" boolean property. Doing this makes the Listbox fire a Drag Event when the source is itself the Listbox. When "Allow Dragging" is False, the Focus Number property follows the mouse movement allowing you to compare focus numbers and write your customized reorder code for the ListBox. I did add a "Drag Starting?" to handle the Listbox Focus data but I don't need it.
Nothing is mentioned the Focus Number is effected in the Allow Dragging help. It became clear observing how it works.
I would like to know what going on with the Drap Drop Events firing or not firing... what causes the operation to become inoperable. A further troubleshooting tool is needed look deeper into the priority of Events and when and if they fire or trigger.