Prevent word and char wrapping in TppMemo
I am using TppMemo to format and print a mailing address that must fit
within a window envelope.
Because of space limitations, lines that exceed the memo width must be
truncated, not word or character wrapped, but there appears to be no way
to prevent wrapping.
I can use Window's GetTextExtentExPoint, but unfortunately there doesn't
seem to be access to a device context or canvas property for the report
or the TppMemo. I could use another TCanvas (assigning the font from the
memo), but cannot get the width of the memo in logical units.
The reason for using the TppMemo was to easily close up blank lines and
eliminate excess spaces.
How can I truncate the lines in the memo, or use some alternate method
to format the address?
within a window envelope.
Because of space limitations, lines that exceed the memo width must be
truncated, not word or character wrapped, but there appears to be no way
to prevent wrapping.
I can use Window's GetTextExtentExPoint, but unfortunately there doesn't
seem to be access to a device context or canvas property for the report
or the TppMemo. I could use another TCanvas (assigning the font from the
memo), but cannot get the width of the memo in logical units.
The reason for using the TppMemo was to easily close up blank lines and
eliminate excess spaces.
How can I truncate the lines in the memo, or use some alternate method
to format the address?
This discussion has been closed.
Comments
that will fit on each line in the memo, since you are assigning the lines
programmatically and can get the text width.
You can access Report.Printer.Canvas property to get at a canvas..
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com