10-04-2012 08:54 AM
LV 2010.0
Take a look at this JING: http://screencast.com/t/clZKConxY
The first part shows a VI in EDIT mode (not running).
Notice how the target Listbox shows a gray highlight line between rows, where the new row(s) will be inserted.
THAT'S THE VISUAL FEEDBACK THAT I WANT.
However, when I RUN the VI, I cannot get that visual cue.
I can drag a NUMBER or a STRING or a LISTBOX ITEM to the target Listbox.
I can make the code do what I want, but I can't see how to get that visual effect.
How can I do that?
Attached is the test code I used.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
Solved! Go to Solution.
10-05-2012 10:20 AM
Steve,
What you are noticing is something that many people have found issues with in the past. While it is not possible to directly have the LabVIEW program emulate what you are seeing while in development mode and not running, it may be possible for you to programmatically determine when the drag has ended. Here is a link to a knowledge base that better describes this:
http://digital.ni.com/public.nsf/allkb/88D6EDBA5D345DC08625796B0076768F?OpenDocument
This concept is also explained in a forum post in terms of gathering pixel position to determine where you may be dropping an item into the listbox. The post link can be found here:
http://forums.ni.com/t5/LabVIEW/listbox-dragging-problem/m-p/52339?requireLogin=False
Hopefully this helps, and good luck with developing the rest of your application.
Regards,
Keith M.
Applications Engineering
10-05-2012 11:03 AM
OK, so it can't be done.
I can handle the code just fine and figure out where the mouse dropped the item (top half = insert above, bottom half = insert below), but there's no user feedback to indicate which way it's going to go.
I have moved on, and implemented a custom symbol which points to the space BELOW the line in question. Now you drag it over the symbol (and the cursor changes to indicate acceptance), and then insert the item AFTER the item it was dropped on.
But it would be nice to have that visual feedback the way it is in EDIT mode.
Blog for (mostly LabVIEW) programmers: Tips And Tricks