// das ist der drag versuch, an dem ich verzweifel.
procedure TForm1.cxGrid1DBTableView1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
AHitTest: TcxCustomGridHitTest;
tempwinctrl:TWinControl;
begin
ClickPoint := Point(X, Y);
AHitTest := (Sender
as TcxGridSite).GridView.ViewInfo.GetHitTest(ClickPoint);
if AHitTest.HitTestCode = htCell
then // Record is being dragged
begin
if Windows.DragDetect(
Handle, ClientToScreen(POINT(X, Y)))
then
begin
// hier bereite ich die drag compo vor
tempwinctrl := DMTextTarget1.AcceptorControl;
DMTextTarget1.AcceptorControl :=
nil;
curtitle := DM1.DSLinks.DataSet.FieldByName('
LinkName').AsString;
curlink := DM1.DSLinks.DataSet.FieldByName('
LinkAdr').AsString;
DMTextSource1.CustomFormatData.Clear;
DMTextSource1.CustomFormatData.AddFormat(IntToStr(CF_TEXT), curlink);
DMTextSource1.CustomFormatData.AddFormat('
FileGroupDescriptor', makeFGDFromURLTitle(curtitle+'
.URL'));
DMTextSource1.CustomFormatData.AddFormat('
FileContents', GetFileContents);
DMTextSource1.CustomFormatData.Items[DMTextSource1.CustomFormatData.Count-1].AllowTrailingNull := false;
DMTextSource1.CustomFormatData.AddFormat('
UniformResourceLocator', curlink);
//if Windows.DragDetect(Handle, ClientToScreen(POINT(X, Y))) then
DMTextSource1.Execute;
DMTextTarget1.AcceptorControl := tempwinctrl;
end;
end;
end;