How to activate the ruler

General TRichView support forum. Please post your questions here
Post Reply
theadmin
Posts: 3
Joined: Wed Apr 19, 2006 11:18 pm

How to activate the ruler

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

Post 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.
theadmin
Posts: 3
Joined: Wed Apr 19, 2006 11:18 pm

Post 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.
Pieter Zijlstra
Posts: 42
Joined: Sat Oct 08, 2005 3:56 pm
Location: The Netherlands
Contact:

Post 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
theadmin
Posts: 3
Joined: Wed Apr 19, 2006 11:18 pm

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