listbox dragDrop DragOver

//listbox dragDrop DragOver 
procedure TForm1.Edit1DragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
begin
    Accept := True;
end;

procedure TForm1.Edit1DragDrop(Sender, Source: TObject; X, Y: Integer);
begin
    (Sender as TEdit).Text := (Source as TListBox).Items[(Source as TListBox).ItemIndex];
end;




posted @ 2012-06-02 10:13  XE2011  阅读(176)  评论(0编辑  收藏  举报