Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > How to set the with of a textbox so it fits exactly

Reply
Thread Tools

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

 
 
ton
Guest
Posts: n/a
 
      02-10-2004
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


 
Reply With Quote
 
 
 
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      02-11-2004
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.


"ton" <(E-Mail Removed)> wrote in message
news:c0b3mf$8uv$(E-Mail Removed)1.nb.home.nl...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
how to maximize the browser window that fits the monitor size? jrefactors@hotmail.com HTML 9 04-28-2011 02:23 PM
layout decorator framework that fits well w/ spring William Z. Java 0 03-22-2006 11:19 PM
How to create window that exactly fits the content Dropstengel Javascript 7 08-17-2004 08:34 PM
Spaces in path to app causing RMI fits with MalformedURLException Kerry Shetline Java 1 09-04-2003 10:41 PM



Advertisments