Textwidth of TppDBText
Hi,
I created a label with report builder and now I have to change the fontsize
depending on the textwidth. The TppDBText object is set to autosized and if
the printed text is larger than the column width, the fontsize should
reduce. But I didn't find a way how I can read the textwidth or width of the
component. I like to solve it with RAP because there could be different
objects and rtmfiles. Does anybody have an idea?
Cheers
Ingo
I created a label with report builder and now I have to change the fontsize
depending on the textwidth. The TppDBText object is set to autosized and if
the printed text is larger than the column width, the fontsize should
reduce. But I didn't find a way how I can read the textwidth or width of the
component. I like to solve it with RAP because there could be different
objects and rtmfiles. Does anybody have an idea?
Cheers
Ingo
This discussion has been closed.
Comments
RAP does not natively contain a TextWidth routine. The easiest way to work
around this would be to create a pass-thru function that determines the text
width of a value given a certain font. This could be done using the
TCanvas.TextWidth routine in Delphi.
For examples of how to create a RAP Pass-thru function, see the RAP demos
located in the \Demos\0. RAP\... directory.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com