Text box or label Best Fit

  • Thread starter Thread starter Stuart
  • Start date Start date
S

Stuart

I would like, with code, to set the width of a text box
(or label) to "best fit", based on its value (or
caption). Like the effect you would get by double
clicking the handle in design mode. Any suggestions on
how to do this?

Thank you, Stuart
 
See:
http://www.lebans.com/textwidth-height.htm
TextHeightWidth.zip is a replacement for the Report object's TextWidth
and TextHeight methods. It is multiline aware and can work in both
Report and Form views. Includes a sample report to show you how to
autosize individual controls with different formatting on the same line
to simulate RTF style text.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Thanks very much for this. I am surprised at how complex
it is, but that's MS Access....

Stuart
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top