15. august 2002 - 11:03Der er
3 kommentarer og 1 løsning
Copy richtext fra richedit til Clipboard
Hej,
Jeg ønsker en copy funktion der sender richtext fra richedit til clipboard. Jeg har prøvet med følgende med følgende men så forsvinder tekstens formatering og farver.
This example uses an edit box, a rich edit control, and a button on a form. When the user clicks the button, text is copied from the rich edit control and pasted into the edit box. Note that only the text is pasted. If the rich edit control includes any formatting information that is not pasted into the edit control. If the destination were a rich edit control, the formatting information would be copied as well.
procedure TForm1.Button1Click(Sender: TObject);
begin RichEdit1.SelectAll; RichEdit1.CopyToClipboard; Edit1.Clear; Edit1.PasteFromClipboard; RichEdit1.SetFocus; end;
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.