From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-05-2007 10:43 AM
04-12-2007 03:44 PM
04-12-2007 09:24 PM
I don't think that there is a built in way to do it or really any way to do it other than some trickery with an overlayed picture control or something. I was the developer for drag and drop, and I have to admit that I know that there is room for improvement especially when trying to show feedback on customized drags. Please, post any suggestions that you have to the forum or the suggestion center. They will definitely not go unnoticed.
Jeff Peters
LabVIEW R & D
03-29-2017 03:31 PM - edited 03-29-2017 03:33 PM
Almost ten years late to the party, but I solved the same problem last year with this scheme:
1... Have a single decoration, consisting of a right-facing line with arrowhead, in the pane containing the tree.
2... At startup, obtain a reference to that decoration, cache it somewhere, and make the arrow invisible.
3... At DRAG ENTER / DRAG OVER time, use the POINT TO ROW COLUMN method (invoke node) to get the tag of the item you're over.
4... Use that tag as the ACTIVE ITEM.TAG in a property node. Obtain the INDENT LEVEL, CELL HEIGHT, and ACTIVE CELL POSITION.TOP results of that same property node.
5... Use the CELL TOP and CELL HEIGHT to divide the vertical space into four quarters.
6... Compare the Mouse COORDS.VERTICAL to the CELL TOP + the quarters. If you're in the top quarter, then the arrow should show ABOVE the item, and be longer (horizontally wider), showing you're going to insert ABOVE.
7... If you're in the bottom quarter, the arrow should show BELOW the item, and be longer, showing you're going to insert AFTER.
8... If you're in the middle two quarters, the arrow should show ON the item center, and be shorter, showing you're going to REPLACE the item under the cursor.
9... Use the INDENT LEVEL to determine the width of the arrow, if you like.
10... At DROP time, do the same calculations, and then perform the insert or replace operation as indicated.
11... In the DRAG ENDED event, hide the arrow decoration.
Blog for (mostly LabVIEW) programmers: Tips And Tricks