LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Drag and drop from a string indicator?

Hi,

 

Labview has a really nice example of how to drag and drop from a listbox to a waveform. I modified this VI so the string value of the selected item of the listbox can be dropped to a string indicator. I'd like this to happen to the other direction as well, so I can drop items from a string indicator (or control) to a listbox, but the "start dragging" event never gets fired as - instead of dragging - the mouse selects the string. 

 

Disabling the indicator does not help.

Allow dragging is set to true.

 

Any ideas?
thanks!

Message 1 of 5
(472 Views)

Hi,
You need to first select the string, then drag the selected text

DragString.gif

 

0 Kudos
Message 2 of 5
(421 Views)

Interesting. Can it be somehow solved to make the drag and drop without actually selecting the text?

0 Kudos
Message 3 of 5
(403 Views)

You could select the entire text when your mouse/keyboard enters the field.  Do it in such a way that you still can make a subselection (once entered).  Maybe by only selecting all when nothing is selected?

 

But I would rather go for the "Start Drag" Invoke Node when pressing the mouse button somewhere on the field.  That way you don't have to fiddle with selecting the text first (which might be hard when there is only a single character in the field for instance).

0 Kudos
Message 4 of 5
(383 Views)

Do you want the user to be able to type into the field? If so, they'll have a cursor and will be able to highlight text. How will your user indicate if they're trying to highlight their text or if they're trying to drag the text out of the control?

 

If you DO want them to be able to type or select the text, you'll have to train them that they must highlight it first. This is the normal behavior for dragging and dropping basically all text boxes I've ever seen.

 

If you DON'T want them to be able to type or select the text, just swap your text box with a listbox that LOOKS like a text box and only has room for one item.

0 Kudos
Message 5 of 5
(105 Views)