Tabstops are lost after loading *.rvf file

General TRichView support forum. Please post your questions here
Post Reply
j&b
Posts: 184
Joined: Mon Sep 05, 2005 1:35 pm

Tabstops are lost after loading *.rvf file

Post by j&b »

I write a text with tabstops and save him as xyz.rvf file.
After closing and starting program and loading xyz.rvf (tbdRichViewEdit 12.4.1) tabstops are missing.
What’s to do ?
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please send me this RVF file.
j&b
Posts: 184
Joined: Mon Sep 05, 2005 1:35 pm

Post by j&b »

Sergey Tkachenko wrote:Please send me this RVF file.
I have found the error:

After loading RVF-file I mark the whole memo (memo.selectAll) and set rvRuler1.FirstIndent:= 0.1, so that tables are not so near at left memo border.
This delete ruler.firstIndent (not tabstops) I have set before - no wonder ;-).

In this way Sergey told me (once again) how to load RVF file in TDBRichViewEdit correct:

1) Call memo.CanChange. This method with changed table into editing mode and has the same effect as calling Table1.Edit.
2) Call memo.LoadRVF
3) Call memo.Change. This method will inform table that the memo was modified.
4) If you want to save changes immediately, call table1.post. If not, call memo.Format.

See http://www.trichview.com/help/idh_examp ... edit1.html

This sequence of actions (CanChange - modifications - Change - Format) is required only for viewer-style methods.
Editing-style methods do this work automatically:
if OpenDialog1.Execute then
DBRichViewEdit1.InsertRTFFromFileEd(OpenDialog1.FileName);
j&b
Posts: 184
Joined: Mon Sep 05, 2005 1:35 pm

Post by j&b »

Sergey told how to load RVF file in TDBRichViewEdit correct:

But why runs this code too?

if memo.loadRVF(s)=false then exit;
Memo.Format;
rvRuler1.FirstIndent:= 0.1;
if table1.state in [dsEdit, dsInsert] then table1.post;
Post Reply