Page 1 of 1

How to determine dynamic document height

Posted: Tue Nov 15, 2005 12:35 pm
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?

Posted: Tue Nov 15, 2005 2:08 pm
by Michel
Help -> Overview -> Scrolling topic seems to indicate that what you want is the DocumentHeight property.
Michel

Posted: Wed Nov 16, 2005 1:02 pm
by Guest
Correct! The documentheight property was the one I was looking for.
I've already successfully implemented my wanted function.
Thanks