Good grief - what a title!

  • Thread starter Thread starter Geoff Cox
  • Start date Start date
G

Geoff Cox

Hello,

The title should have been "size of text box match number of
characters?"

Is there a way in which to make the size of the text box inserted
using Control Toolbox fit the number of characters?

Apart that is than by using visual inspection and trial and error!

Cheers,

Geoff
 
Hi,

Does the Autosize property not work for you?

Andy,

Not clear how that works yet - if I select say max 100 characters and
then autosize is true, the text box shrinks to very small size! What
am I doing wrongly?

Cheers

Geoff
 
Hi,

Does the Autosize property not work for you?

Andy,

I should have said that the aim is to have a box with a limit of say
100 characters but which is sized so that it is big enough for just
that number of characters.

Is this possible?

Geoff
 
Your further explanation throws a different light on the problem. Which
is the size of a textbox large enough to hold a 100 characters will
depend on which characters are typed, unless a fixed font is used.

With a proportional font a 100 W's is going to require much more space
than a 100 i's.

Textboxes do have MaxLength property, which will at least allow you to
restrict the text to 100 characters.

Cheers
Andy
 
Your further explanation throws a different light on the problem. Which
is the size of a textbox large enough to hold a 100 characters will
depend on which characters are typed, unless a fixed font is used.

With a proportional font a 100 W's is going to require much more space
than a 100 i's.

Textboxes do have MaxLength property, which will at least allow you to
restrict the text to 100 characters.

Andy,

So really best I can do is go for the MaxLength and make the box say
10% larger to cope with varying font sizes?

Geoff
 
Set the text maxlen to 100
Make the textbox big enough to hold 100 W's and turn off autosize.

Autosizing whilst running a slideshow doesn't seem to work to well.

Cheers
Andy
 
Autosize will increase/decrease the width of the textbox based on the
content in it. It is not going to pre-compute the width for 100 characters.

OK thanks Shyam.

Geoff
 
Set the text maxlen to 100
Make the textbox big enough to hold 100 W's and turn off autosize.

Autosizing whilst running a slideshow doesn't seem to work to well.

Andy,

OK - will do.

Cheers

Geoff
 
Back
Top