Drag and Drop из RichEdit
Falk0ner, вс, 06/07/2008 - 15:34.
Drag and Drop из RichEdit
var
Form1: TForm1;
richcopy: string;
transfering: boolean;
implementation
{$R *.DFM\}
procedure TForm1.RichEdit1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if length(richedit1.seltext)>0 then begin
richcopy:=richedit1.seltext;
transfering:=true;
end; //seltext
end;
procedure TForm1.ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if transfering then begin
transfering:=false;
listbox1.items.add(richcopy);
end; //transfering
end;
Form1: TForm1;
richcopy: string;
transfering: boolean;
implementation
{$R *.DFM\}
procedure TForm1.RichEdit1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if length(richedit1.seltext)>0 then begin
richcopy:=richedit1.seltext;
transfering:=true;
end; //seltext
end;
procedure TForm1.ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if transfering then begin
transfering:=false;
listbox1.items.add(richcopy);
end; //transfering
end;
http://delphiworld.narod.ru/ DelphiWorld 6.0
Отправить комментарий