I load a formated text from a non empty TMemoryStream into my TRichViewEdit then copy data to the clipboard via CopyRTF method but when I check there's nothing in the clipboard.
Code:
form := TForm.Create(nil);
rich := TRichViewEdit.Create(form);
rich.Name := 'rich1';
rich.Parent := form;
rich.LoadTextFromStream(memoryStream)
rich.CopyRTF;
rich.Free;
form.Free;
I would appreciate a little help....
Copy from TRichViewEdit to clipboard
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Only selected fragment is copied.
In addition, TRVStyle is required:
In addition, TRVStyle is required:
Code: Select all
form := TForm.Create(nil);
rich := TRichViewEdit.Create(form);
rich.Name := 'rich1';
rich.Parent := form;
rvstyle := TRVStyle.Create(form);
rich.Style := rvstyle;
memoryStream.Position := 0;
rich.LoadTextFromStream(memoryStream)
rich.Format;
rich.SelectAll;
rich.CopyRTF;
form.Free;