01]ListBox1的DragMode设置为dmAutomatic
02】Memo1的OnGragOver事件和OnDragDrop事件
procedure TForm8.Memo1DragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); begin if TListBox(Source)=ListBox1 then Accept:=true; end;
procedure TForm8.Memo1DragDrop(Sender, Source: TObject; X, Y: Integer); begin if ListBox1.ItemIndex>-1 then Memo1.SelText :=Listbox1.Items[ListBox1.ItemIndex]; end;
标签:end,ListBox1,TObject,Delphi10.3,Source,Integer,Memo1 From: https://www.cnblogs.com/tulater/p/18150746