How to set the with of a textbox so it fits exactly

T

ton

In my composite control I use a table object with cell and row objects. A
Textbox is added to this control. How can I set the width of the textbox so
it fits. If I set a to high value, the table is much to wide, if it is to
short, the textfield will scroll in the tablecell, and it is not nice to
see.

So Question one:
- how to set the with depending on textlength and font (webcontrol!!)
- how to adjust the wordwrap behaviour in a table (No wordwrap)

Thanx

Ton
 
A

Alessandro Zifiglio

For the 1st question :
Why would you want to expand the textbox based on the width of characters.
If you have a textfield which takes input more than 50 characters then set
the textbox to multiline, depending on your needs. I'm saying 50 off the top
of my head. Having a textfield expand depending on the amount of characters
is not a very good idea, and you'd have to get into client side scripting to
achieve this.

word wrap for a cell ? Have you tried setting a fixed width for the cell.
This should work.
 

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

Members online

No members online now.

Forum statistics

Threads
473,890
Messages
2,569,972
Members
46,310
Latest member
ClariceGal

Latest Threads

Top