LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Drag and drop multicolumn, not always dropping in indicated position

I have a multicolumn that i'm selecting multiple columns, dragging and dropping within the same multicolumn. everything is working great but the drop position is not always dropping between the cells as indicated.

 

On a drop event, I use the Point to Row Column function to get the position of the cursor and return the row its pointed at:

 

john_joe_0-1747266806427.png

 This however, does not always return the position the indicator is showing on the multicolumn because the curser can be over the bottom half of the top row and the top half of the second row and the multicolumn indicator doesn't change position yet this function does change value. Is there a way to get the indicator value when dragging instead of using the Point To Row Column function?

 

john_joe_4-1747267245518.png

 

0 Kudos
Message 1 of 2
(277 Views)

I don't have much experience with drag and drop and I'm guessing there is no direct way of getting the location of where LV is going to drop, but I can quickly think of a couple of options for getting the result:

  1. Use the drag ended event and compare the state of the listbox to what it was when you started know how it changed.
  2. Use the Drop event like you did and then use a combination of the ActiveCell position and size property on the two relevant row to see where the drop position is relative to the two rows. I don't think I would trust this to always behave in the way you think it would (for example, is the drop target decided purely on which separator the cursor is closer to?), but it's certainly something you can check.

___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(232 Views)