Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, USA
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Autosize text to fit control (Access97)

    I know i can autosize a control to fit text size... but is there a method of autosizing text (changing font size) to fit neatly within the boundary of a control? Can Grow is not an option on this particular report because it is replica of a real fill in form that needs to be submitted and Can grow messes up the whole darn thing... As usual any suggestions are appreciated... Thank you...

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Autosize text to fit control (Access97)

    I vaguely recall a function that returned the length of a string that factored in the font style and size. Unfortunately, I can't locate this in Help; so maybe it was a custom control I once saw. Anyway, if such a function did in fact exist, then you could use it to test your string at various sizes to determine what would fit in a control.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Autosize text to fit control (Access97)

    I don't think I would like to see the results of that kind of resizing. You would have an array of font sizes that would not be very aethestically appealing . Why would you want to expand the text to fill the control anyhow? Another thing to keep in mind is that changing the font size also changes its height. You could wind up with letters that neatly filled the space horizontally but were cut off vertically.
    Charlotte

  4. #4
    Lounger
    Join Date
    Nov 2001
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autosize text to fit control (Access97)

    Try Stephan Lebans site, I believe there's an example of what you want to do.
    HTH

Posting Permissions

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