LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MC Listbox Visual Drag-Drop Feedback

Solved!
Go to solution

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.

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 3
(2,452 Views)
Solution
Accepted by topic author CoastalMaineBird

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

0 Kudos
Message 2 of 3
(2,437 Views)

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.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 3
(2,427 Views)