Good grief - what a title!

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
 
G

Geoff Cox

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
 
G

Geoff Cox

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
 
A

Andy Pope

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
 
G

Geoff Cox

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
 
A

Andy Pope

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
 
G

Geoff Cox

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
 
G

Geoff Cox

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
 

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