Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2005
    Location
    Wichita, Kansas, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dynamic font sizing (2007)

    Edited by HansV to provide link to post. It's extremely simple: I only had to insert [ before and ] after Post: 566,407.

    I have a report with a text box in it that can not grow beyond a 2.5" height to be able to format the report properly. We want the default font to be 11 point, but about 10% of the time, the text is too long. This is in a text box using rich text formatting, with several numbered lines, some of which spill over to two lines. Is there a way to "On Format", to count the number of lines of text (or the height of the text thus far), then adjust the font size accordingly to get it all to fit into the text box? (I reviewed <post:=566,407>post 566,407</post:> that addresses a similar issue with number of characters, but don't know how to do a similar idea wiht lines or height of text.)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Dynamic font sizing (2007)

    Go to PrintLines on Stephen Lebans' website and download the Printlines.zip file.

    To test:
    - Extract the database from the zip file.
    - Right-click the database and select Properties from the popup menu.
    - Click Unblock.
    - Click OK.
    - Open the database. When asked whether to convert or open it, select convert, and specify a name for the converted database.
    - Try the report AutoReSizeMemo.
    - View the code behind the report to see how it's done using the On Format event of the Detail section.

    To use in your own database:
    - Import the four modules from Stephen Lebans' database into your database.
    - Create code in the On Format event of the Detail section of the report similar to that in AutoReSizeMemo.
    Attached Images Attached Images
    • File Type: png x.png (11.8 KB, 0 views)

  3. #3
    2 Star Lounger
    Join Date
    Jan 2005
    Location
    Wichita, Kansas, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dynamic font sizing (2007)

    Thanks--that points me in the right direction. And thanks to Mr. Lebans, too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •