Eigentlich solltest du mit
Sender und
Source Zugang zu allen Informationen haben:
Delphi-Quellcode:
procedure TForm1.ListBox1DragDrop (Sender, Source: TObject; X, Y: Integer);
var
SourceBox, TargetBox : TListBox;
begin
if ((Sender is TListBox) and (Source is TListBox)) then
begin
SourceBox := TListBox(Source); // da kommen die Daten her
TargetBox := TListBox(Sender); // da sollen sie hin
ShowMessage('Source: ' + SourceBox.Name + ', Form: '
+ GetParentForm(SourceBox).Caption
+ #13#10 +
'Target: ' + TargetBox.Name + ', Form: '
+ GetParentForm(TargetBox).Caption);
end;
end;
Gruß Hawkeye