TNGUrlWFormat

<< Click to Display Table of Contents >>

Navigation:  Data Formats >

TNGUrlWFormat

Previous pageReturn to chapter overviewNext page

TNGUrlWFormat class implements common URL data format and allows to drag/receive Unicode URLs. NG Drag&Drop use string standard Delphi type for working with Unicode URLs.

 

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.URLW to make user's code more readable:

 

NGDropSource.Add(CF.URLW.Data('http://google.com'))
            .Execute;
 
NGDropTarget.Register(MyTargetPanel, procedure(C: TNGTargetContext)
var
  s: string;
begin
  if C.Accept(CF.URLW.Ref(@s)) then
    Edit1.Text := s;
end);