Page 1 of 1

How to save the margins configuration ?

Posted: Sat Jan 21, 2012 11:28 am
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

Posted: Mon Jan 23, 2012 7:53 am
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;

Posted: Mon Jan 23, 2012 10:16 am
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.

Posted: Mon Jan 23, 2012 3:04 pm
by Sergey Tkachenko
What's the value of DBRichViewEdit.FieldFormat ?

Posted: Mon Jan 23, 2012 5:38 pm
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

Posted: Tue Jan 24, 2012 11:21 am
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.

Posted: Wed Jan 25, 2012 10:12 am
by alexandreq
Solved - Thanks very much.