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

Prevent word and char wrapping in TppMemo

edited August 2001 in General
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?

Comments

  • edited August 2001
    This isn't currently supported in the memo. You'll need to measure the text
    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


This discussion has been closed.