<< Click to Display Table of Contents >> TNGHDropFormat |
|
The class declares two methods: Data and Ref. Data method can be used to drag file paths data at the source side, while Ref method can be used to receive text data at the target side. NG Drag&Drop declares special type alias CF.HDROP to make user's code more readable:
SetLegnth(s, 3);
s[0] := 'c:\MyText1.txt';
s[0] ;= 'c:\MyText2.txt';
s[0] := 'c:\MyText3.txt';
NGDropSource.Add(CF.HDROP.Data(s))
.Execute;
NGDropTarget.Register(MyTargetPanel, procedure(C: TNGTargetContext)
var
s: TNGStrArray;
begin
if C.Accept(CF.HDROP.Ref(@s)) then
ShowFiles(s);
end);