Home General

Shrink text to fit or wrapping text around diagrams

edited October 2001 in General
I am reporting text and diagrams, the text in a TppMemo control. I would
like to be able to:

a) Adjust the font at run time so that all the text is "shrunk to fit" in a
fixed size rectangle.

b) Wrap text around a diagram. This could be having the text start in a
small rectangle next to the diagram and then extend into a wider layout on
the next page i.e. splitting the text across two memo controls

Any suggestions how I can do these things?

Sarah

Comments

  • edited October 2001
    >
    a
    I would suggest calling TppPlainText.WordWrap (located in the
    ppPlainText.pas unit)

    Reduce the font size until this routine the CharPos = Length(Text), then
    you'll know it fit.

    You can pass Report.Printer as the printer object.

    Here I would extend the width of the memo control to get 'closer' to the
    diagram. Then call WordWrap to make sure the text fits.

    All this would be done in the BeforePrint event of the band...

    Cheers,

    --
    -
    --
    Tom Ollar
    Digital Metaphors Corporation
  • edited October 2001
    Thanks for the shrink fit suggestion using TppPlainText.WordWrap.

    For the wrap around diagrams is there any way of putting text from a single
    source into say a narrow region on the first page but the overflowing onto a
    wider area on subsequent pages?

    Thanks
    Sarah
This discussion has been closed.