In RichViewEdit Unicode work fine. but in ScaleRichViewEdit not.
I set
RichViewEdit1.RTFReadProperties.UnicodeMode = rvruOnlyUnicode.
and use the TRVStyle1 from RichViewEdit with
Unicode property = True for all RVStyle1.TextStyles
If I use this a strange behaviour occurs: A correct letter is displayed at the begining of the text and then an undifined letter was written to the right of it and cursor returns to the start of the text.
Unicode RichViewEdit ScaleRichViewEdit
-
- Site Admin
- Posts: 17553
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Do you change Unicode property of Styles when the document is already displayed? It is wrong, you need to do it when the editor is completely clear (after calling SRichViewEdit.Clear).
Or use the procedure ConvertRVToUnicode from http://www.trichview.com/forums/viewtop ... t=70#11569 (from the second message in this topic).
Or use the procedure ConvertRVToUnicode from http://www.trichview.com/forums/viewtop ... t=70#11569 (from the second message in this topic).
Code: Select all
ConvertRVToUnicode(SRichViewEdit1.RichViewEdit.RVData);
ConvertRVToUnicode(SRichViewEdit1.RVHeader.RVData);
ConvertRVToUnicode(SRichViewEdit1.RVFooter.RVData);
I found the problem.
If I make a clear before loading from stream it works fine:
old not working:
begin
SRichViewEdit1.RichViewEdit.InsertRTFFromStreamEd(TempStr);
end;
new working fine:
begin
SRichViewEdit1.RichViewEdit.Clear;
SRichViewEdit1.RichViewEdit.InsertRTFFromStreamEd(TempStr);
end;
Thanks Sergey you gave me the needed hint.
If I make a clear before loading from stream it works fine:
old not working:
begin
SRichViewEdit1.RichViewEdit.InsertRTFFromStreamEd(TempStr);
end;
new working fine:
begin
SRichViewEdit1.RichViewEdit.Clear;
SRichViewEdit1.RichViewEdit.InsertRTFFromStreamEd(TempStr);
end;
Thanks Sergey you gave me the needed hint.
-
- Site Admin
- Posts: 17553
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Hmm..
InsertRTFFromStreamEdi is an editing operation (undoable by the user).
It requires a formatted document, so the correct code is
Or, if you do not need an editing operation:
InsertRTFFromStreamEdi is an editing operation (undoable by the user).
It requires a formatted document, so the correct code is
Code: Select all
SRichViewEdit1.Clear;
SRichViewEdit1.Format;
SRichViewEdit1.RichViewEdit.InsertRTFFromStreamEd(TempStr);
Code: Select all
SRichViewEdit1.Clear;
SRichViewEdit1.RichViewEdit.LoadRTFFromStream(TempStr);
SRichViewEdit1.Format;
Last edited by Sergey Tkachenko on Sat Mar 19, 2011 4:05 pm, edited 1 time in total.
-
- Site Admin
- Posts: 17553
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: