
procedure
TForm1
.
Label1MouseDown
(
Sender
:
TObject
;
Button
:
TMouseButton
;
Shift : TShiftState ; X , Y : Integer );
begin
if button = mbleft then ( sender as tlabel ). BeginDrag ( false );
end ;
procedure TForm1 . Memo1DragOver ( Sender , Source : TObject ; X , Y : Integer ;
State : TDragState ; var Accept : Boolean );
begin
if source is tlabel then accept := true ;
end ;
procedure TForm1 . Memo1DragDrop ( Sender , Source : TObject ; X , Y : Integer );
begin
if ( sender is tmemo ) and ( source is tlabel ) then
( sender as tmemo ). Lines . Add (( source as tlabel ). caption );
end ;
Shift : TShiftState ; X , Y : Integer );
begin
if button = mbleft then ( sender as tlabel ). BeginDrag ( false );
end ;
procedure TForm1 . Memo1DragOver ( Sender , Source : TObject ; X , Y : Integer ;
State : TDragState ; var Accept : Boolean );
begin
if source is tlabel then accept := true ;
end ;
procedure TForm1 . Memo1DragDrop ( Sender , Source : TObject ; X , Y : Integer );
begin
if ( sender is tmemo ) and ( source is tlabel ) then
( sender as tmemo ). Lines . Add (( source as tlabel ). caption );
end ;
附件列表