Diterming Textbox size

S

Stephen Lebans

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.



History

Version 4.5: Increased accuracy of auto sizing for a ListBox.

Version 4.3: Added sample Form to demonstrate auto sizing for a ListBox.

Version 4.2: Added report to demonstrate auto sizing to mix text
formatting on one row.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
M

Marshall Barton

Roy said:
I have report with textbox.
the textbox is bound to huge memo which sometimes provide 1 row or 10 rows

Is there a way to diterme how many rows does the textbox will use on
runtime?

And if so is there a way to set it's height to fit exacly to the number of
rows?


I don't think you need to know how many "rows". Just set
the text box's CanGrow property to Yes and it will expand to
the correct height automatically.
 
R

Roy Goldhammer

Hello there

I have report with textbox.
the textbox is bound to huge memo which sometimes provide 1 row or 10 rows

Is there a way to diterme how many rows does the textbox will use on
runtime?

And if so is there a way to set it's height to fit exacly to the number of
rows?

any help would be useful
 

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

Top