Page 1 of 1

SclRVRuler - Margins

Posted: Wed Aug 08, 2012 8:09 pm
by leandersantosm
Hello!

I have the code below in my project:

Code: Select all

SclRVRuler1.LeftMargin := DBSRichViewEdit2.PageProperty.LeftMargin;
SclRVRuler1.RightMargin := DBSRichViewEdit2.PageProperty.RightMargin;
The code should change the left and right margins of my SclRVRuler1. The problem is: this code only changes the left margin.

But, if I try to change the right margin before left, like this:

Code: Select all

SclRVRuler1.RightMargin := DBSRichViewEdit2.PageProperty.RightMargin;
SclRVRuler1.LeftMargin := DBSRichViewEdit2.PageProperty.LeftMargin;
Only changes the right margin.

Any help?
Thanks!

Posted: Thu Aug 09, 2012 12:36 pm
by Sergey Tkachenko
Why do you need changing margins of the ruler in a code? It is not designed to work in this way. It is assumed that it is synchronized with TSRichViewEdit/TDBSRichViewEdit.

Posted: Thu Aug 09, 2012 8:21 pm
by leandersantosm
I tried to change the DBSRichView margins before, but it does no changes the ruler margins.

What am I missing?

Posted: Sun Aug 12, 2012 7:58 am
by Sergey Tkachenko
Please update TSRichViewEdit to the newest version and test if this problem still exists.
In the new versions, the ruler's margins must be updated automatically when margins of TSRichViewEdit change.