SclRVRuler - Margins

General TRichView support forum. Please post your questions here
Post Reply
leandersantosm
Posts: 20
Joined: Fri Jun 03, 2011 8:33 pm

SclRVRuler - Margins

Post 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!
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
leandersantosm
Posts: 20
Joined: Fri Jun 03, 2011 8:33 pm

Post by leandersantosm »

I tried to change the DBSRichView margins before, but it does no changes the ruler margins.

What am I missing?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Post Reply