ui.DragDrop.GetLocationParent()

When a dragged object is the one from the TreeView, it can be dropped to the destination object as a sibling or a child node. getLocationParent() is used to distinguish between these two options. The method returns an integer value identifying the index of the target node parent. The index of the target node itself is returned by the getLocationRow() method. If the indexes returned by the both methods are the same, the dropped object should be appended to the target node as a child.

When the value returned by getLocationParent() identifies the parent node to where the dragged object is to be added as a child; the value returned by getLocationRow() specifies the sibling node. If these values are different, the dropped node should be inserted before the node, found by getLocationRow().

These methods can be used in ON DROP and in ON DRAG_OVER blocks to cancel the drop in case the returned indexes do not meet the necessary conditions.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.