Page 1 of 1

How to activate the ruler

Posted: Fri Jan 05, 2007 2:06 am
by theadmin
Elementary question, I didn't notice an option for a ruler to be displayed in the RichView editor, how do I display the ruler?



Thanks

Posted: Fri Jan 05, 2007 11:29 am
by Sergey Tkachenko
Ruler is a separate component included in RichViewActions ( http://www.trichview.com/resources/actions/ )
The ruler can be used separately from actions.

Posted: Sat Jan 06, 2007 7:31 pm
by theadmin
I downloaded the file and compiled the example, but now I am looking at a few new problems.

After looking at the example ActionTest, I cannot seem to find any code in there that shows things like:

1. When you move the thumb of the ruler, the text in the RichViewEdit moves with it too.

I have been looking at the demo for quite a while, but I don't see anything in there except this line of code.

RVRuler1->UpdateRulerMargins();

I have linked the Ruler to the RichEdit, but I dont see any options or anything, maybe I am overlooking at all.

Posted: Sun Jan 07, 2007 11:29 am
by Pieter Zijlstra
The ruler component contains two units. 1st is a general unit called ruler.pas this one contains all the basic functionality like drawing, etc. 2nd is rvruler.pas this is specialized unit which does all the specific handling for a richview component like changing the tabs, indents and margins of a document.
To use the rvruler, all what needs to be done is dropping it on a form and attach a richviewedit component to it by assigning property RVRuler.RichViewEdit. All the handling of moving tabs, etc is then done "automatically" (see code and comments in rvruler.pas).

Pieter

Posted: Sun Jan 07, 2007 7:39 pm
by theadmin
Pieter Zijlstra wrote:To use the rvruler, all what needs to be done is dropping it on a form and attach a richviewedit component to it by assigning property RVRuler.RichViewEdit. All the handling of moving tabs, etc is then done "automatically" (see code and comments in rvruler.pas).

Pieter
Tanks Pieter, when I looked at the properties again it was not linked. That explains it....


Thanks for the help.