How to determine dynamic document height

General TRichView support forum. Please post your questions here
Post Reply
Guest

How to determine dynamic document height

Post by Guest »

I'd like to dynamically resize the height of the TRichview(edit) component on my form between for example 75 and 350 points.
How Do I determine the total height of the formatted text?

My demand is:
1. delete all leading blank lines (including spaces and Tabs)
2. Determine height of the formatted text (th:textheight in point)
3.a th<=75 -> set component height to 75
3.b th between 75 and 350 -> set component height to th
3.c th>350 then set component height to 350

Any idea or code fragment to start with?
Michel
Posts: 92
Joined: Fri Oct 14, 2005 2:56 pm
Contact:

Post by Michel »

Help -> Overview -> Scrolling topic seems to indicate that what you want is the DocumentHeight property.
Michel
Guest

Post by Guest »

Correct! The documentheight property was the one I was looking for.
I've already successfully implemented my wanted function.
Thanks
Post Reply