Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Resize font in TppMemo

edited October 2003 in General
Hi all;

I am sure this was answered before, but in Outlook Newsreader I cannot do
the search (I found how to calculate width, but not the height of a wrapped
text)..

I have non-stretchable TppMemo component with the default font size of 12. I
would like to fit all the text into it by reducing the font size if
necessary. If the font size reaches, for example, 6 than I would like to do
this:

1. reset TppMemo's font back to size 12
2. try to fit as much text as possible
3. print the rest of the text to another page (in another TppMemo component)

Much like in newspapers when at the end of the column it says "Continued on
page 15".

Can someone point me in the right direction?

Nico, do you have some example in your magic bag?

Thanks

Zoran.

Comments

  • edited October 2003
    Never mind. I wrote a function that manipulate the font and splits text into
    2 memos. If anyone is interested I can post the code here - about 50 lines
    of code (it uses 2 string functions from TP's SysTools library).

    Zoran.
This discussion has been closed.