Hi!
I need to insert RTF into TRichView at the current line, without a new line. In TRichViewEdit I use InsertRTFFromStreamEd and it works fine. But TRichView.LoadRTFFromStream does the new line. Do I need to adjust any settings to avoid inserting at the new line?
Thanks!
Insert RTF at the current line in TRichView
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Insert RTF at the current line in TRichView
Do you mean a blank line before the loaded content?
LoadRTFFromStream adds new content to the end, it does not clear existing content, so call Clear before LoadRTFFromStream.
Or do you want to add RTF content to the end of existing paragraph?
LoadRTFFromStream adds new content to the end, it does not clear existing content, so call Clear before LoadRTFFromStream.
Or do you want to add RTF content to the end of existing paragraph?
Re: Insert RTF at the current line in TRichView
Yes I ment thatOr do you want to add RTF content to the end of existing paragraph?
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Insert RTF at the current line in TRichView
Unfortunately, there are no methods for this.
You can
1) Use TRichViewEdit instead of TRichView, use InsertRTFFromStreamEd, then assign ReadOnly = True.
2) Load RTF in a temporal hidden TRichView, save it as RVF (SaveRVFToStream), then use AppendRVFFromStream, with ParaNo parameter = -1. But it allows adding content only to the last paragraph.
You can
1) Use TRichViewEdit instead of TRichView, use InsertRTFFromStreamEd, then assign ReadOnly = True.
2) Load RTF in a temporal hidden TRichView, save it as RVF (SaveRVFToStream), then use AppendRVFFromStream, with ParaNo parameter = -1. But it allows adding content only to the last paragraph.
Re: Insert RTF at the current line in TRichView
Ok, thanks!