I must be doing something wrong. LoadRTF not working?

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

I must be doing something wrong. LoadRTF not working?

Post by GerryD »

I've downloaded the trial version of Richview (V12.6.1) for Delphi 2007 and I'm trying to get it to read in an RTF document. I dropped a tRichView and a style component on my form along with a button with the following code. Basically cloned from one of the demo programs.

begin with RichViewTest do
begin
Clear;
DeleteUnusedStyles(True,True,True);
if loadRTF( 'RV.rtf') then
begin
MessageDlg ( 'Load RTF OK', mtError, [mbOK], 0 );
end;
end;
end;


I click the button and the Load RTF OK dialog pops up but there is nothing displayed in the RichView control.

This seem so basic I can't believe it's so badly broken. What and I missing?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Call Format after LoadRTF.
GerryD
Posts: 10
Joined: Wed Oct 06, 2010 1:07 am
Location: Dallas

Post by GerryD »

That did the trick. Thanks.
GerryD
Posts: 10
Joined: Wed Oct 06, 2010 1:07 am
Location: Dallas

Still not quite there

Post by GerryD »

Sergey Tkachenko wrote:Call Format after LoadRTF.
Calling format did get text displayed on my screen but the RTF formatting isn't working. There is only one font and text that was supposed to be bold is rendered in blue. It looks like RV is thinking it is plain text.

Can you point me in the right direction?
Post Reply