Link to home
Start Free TrialLog in
Avatar of drnadeem
drnadeem

asked on

Drag and Drop

I've got a memo and an Edit control on a form. I want to select a portion of the text and drag it to the edit control so that I will not have to type it in the edit box. This is a good user interface technique, so how will i do it?
Avatar of ECollin
ECollin

Why don't you just use Copy/Paste on the tmemo and on the TEdit controls.
A better way to do it would be to set up a button to copy the selected text into the Edit box, then all you need is

procedure TForm1.Button1Click(Sender: TObject);
begin
  Edit1.Text := Memo1.SelText;
end;

regards

l8knight

p.s. if you really want to drag and drop try the Drag and Drop Component Suite at http://www.melander.dk they are the best I have found.
ASKER CERTIFIED SOLUTION
Avatar of DrDelphi
DrDelphi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
looks good but how can you first select the text ?
Avatar of drnadeem

ASKER

instead of Button = mbLeft
use Button = mbRight