%HI_TVQueryDnDItem function


Function
Function %HI_TVQueryDnDItem returns the tree items which define a position of possible new item in the tree during Drop operation.
Declaration
%HI_TVQueryDnDItem(
   INT in refId,
   OUT in hNode1,
   OUT in hNode2
 )
Parameters
refIdIdentifier of tree view.
hNode1Item in the tree.
hNode2Item in the tree.
Description
Function returns the tree items which define a position where a drop operation has been performed.

A result for the new item is defined as follows:

hNode1hNode2
invalidinvalidDropping out of tree items.
invalidvalidDropping above hNode2.
validinvalidDropping under hNode1.
validinvalidIf hNode1 = hNode2, the new item is dropped directly onto the existing item.
If hNode1 ≠ hNode2, the new item is dropped between the items hNode1 and hNode2, whereby hNode1 and hNode2 are placed always on the same level of the tree.


Return value
BOOL – if it is @TRUE, the function got the position for Drag&Drop, otherwise the values of "out" parameters are undefined.
Example
These files contain an example of using Drag and Drop in the graphic object of Tree view type. After importing these files into the system, the picture DnD_example is added. It enables the drag and drop operations of text and files over the graphic object of Tree view type.
S.DnD_example.xml
SD.FileList.xml
Napíšte komentár