LoadRTF unexpected results

General TRichView support forum. Please post your questions here
Post Reply
GerryD
Posts: 10
Joined: Wed Oct 06, 2010 1:07 am
Location: Dallas

LoadRTF unexpected results

Post by GerryD »

I'm checking out the trial version of tRichVeiw for Delphi 2007. I can load an RTF file but the results are not what I expected. The display is a single font and text that was supposed to be bold is being displayed in blue.

Here's my code.

begin with RichViewTest do
begin
Clear;
DeleteUnusedStyles(True,True,True);
if loadRTF( 'RV.rtf') then
begin
Format;
end;
end;
end;

I'm using the default RVStyle component for my tRichEdit control.

Any help would be appreciated.
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Make sure that

Code: Select all

RichViewTest.RTFReadProperties.TextStyleMode = rvrsAddIfNeeded;
RichViewTest.RTFReadProperties.ParaStyleMode = rvrsAddIfNeeded;
PS: if LoadRTF returns False, document may be partially loaded, so you still need to call Format.
Post Reply