<< Click to Display Table of Contents >> TNGUrlFormat |
|
The class declares two methods: Data and Ref. Data method can be used to drag URL 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.URL to make user's code more readable:
NGDropSource.Add(CF.URL.Data('http://google.com'))
.Execute;
NGDropTarget.Register(MyTargetPanel, procedure(C: TNGTargetContext)
var
s: AnsiString;
begin
if C.Accept(CF.URL.Ref(@s)) then
Edit1.Text := string(s);
end);