How to save the margins configuration ?

General TRichView support forum. Please post your questions here
Post Reply
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

How to save the margins configuration ?

Post by alexandreq »

Hello

I am using dbrrichview with access database.

I setup all the margin configuration for my document and when I save it into my table I want to save all the margin configuration for it too. Is it possible?

Another thing

When I browse my table, it is possible to show my doc according as they were saved, with margin configuration.

thanks
Alex
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Include rvfoSaveLayout and rvfoLoadLayout in DBRichViewEdit.RVFOptions.

Note: when you change margins in code, follow the instructions from http://www.trichview.com/help/idh_examp ... edit1.html , e.g.

Code: Select all

if DBRichViewEdit1.CanChange then begin
  DBRichViewEdit1.LeftMargin := 10;
  DBRichViewEdit1.Change;
  DBRichViewEdit1.Format;
end;
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

Post by alexandreq »

Hi Sergey

Yeah, both options are true.

When I change the margins in the ruler, my table doesn't keep the margins configuration and when I open the text again, it is displayed with the same margin default.

If you could give me an example with your database example I thank you very much.
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

What's the value of DBRichViewEdit.FieldFormat ?
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

Post by alexandreq »

It is rvdbRVF.

Sergey,

is it possible you give me an example with your own example that uses table?

I noticed your component brings some database examples, but no one with ruler. It would be wonderful to have an example where the docs are kept with all margins configurated and when displayed the text, the ruler is settled at the right position when the text was produced.

thanks
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Just use DataSet.AfterScroll:

Code: Select all

procedure TForm1.Table1AfterScroll(DataSet: TDataSet); 
begin 
  RVRuler1.UpdateRulerMargins; 
end;
If it does not help, I'll create a demo.
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

Post by alexandreq »

Solved - Thanks very much.
Post Reply