Text length
Hi,
I need to print the some text into the fixed region of the page. The problem
lay in the uncertainty of the text length at a design stage. I want to
change (reduce) the font size dynamically in case of the long strings.
How I can detect the fact that length of my text more than space of the
ppLabel or ppMemo component? And I need to detect this for Wordwrap=True and
Wordwrap=False cases.
Or may be exist the best way?
Thanks.
I need to print the some text into the fixed region of the page. The problem
lay in the uncertainty of the text length at a design stage. I want to
change (reduce) the font size dynamically in case of the long strings.
How I can detect the fact that length of my text more than space of the
ppLabel or ppMemo component? And I need to detect this for Wordwrap=True and
Wordwrap=False cases.
Or may be exist the best way?
Thanks.
This discussion has been closed.
Comments
is a demo which regenerates the report invisibly until the text can fit on a
single page. This approach will be slow for a larger report, since ti
regenerates the entire report, so perhaps you could create a small report
with a single memo in order to generate to a generic TppDevice in order to
measure the output from each font setting, and then use that font in the
real report which is printing.
http://www.digital-metaphors.com/tips/ForceFontToOnePageReport.zip
Here is an example which changes the font to fit data to a static width..
http://www.digital-metaphors.com/tips/AutoFontSize.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com