Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Textbox width scaling to width of data not width of page?

Reply
Thread Tools

Textbox width scaling to width of data not width of page?

 
 
AndrewF
Guest
Posts: n/a
 
      10-10-2005
Hi there,

I have racked my brains for days on this and can't seem to find a
solution.

I have a form which is dynamically creating some text boxes on it. The
text boxes are single line ones.

At the moment I am creating them and not specifying either width or
column size, preferring to use CSS to style them so the designers can
do it rather than digging through code.

So we have set the fields to be 80% of the page width and it works
absolutely fine when the text in the text fields are empty or less than
80% of the page width.

What happens when the text is longer than that though is that the page
is created to be the width of the text that would be in the text field
if it were all on one line and then the text field is scaled back to
80% of that.

So on particularly long entries it could double the screen width.
Generally it would be a case of putting in a text box which is
multiline but by and large it isn't necessary other than on a few odd
entries where they are entering more text.

Does anyone have any idea why this is happening?

Cheers
AndrewF

 
Reply With Quote
 
 
 
 
Bruce Barker
Guest
Posts: n/a
 
      10-10-2005
you have to specify a page width, so that the 80% is a percent of something.
currently the page is calc'ing the text width to get the page width, then
scaling the textbox to 80% of that.

-- bruce (sqlwork.com)


"AndrewF" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi there,
>
> I have racked my brains for days on this and can't seem to find a
> solution.
>
> I have a form which is dynamically creating some text boxes on it. The
> text boxes are single line ones.
>
> At the moment I am creating them and not specifying either width or
> column size, preferring to use CSS to style them so the designers can
> do it rather than digging through code.
>
> So we have set the fields to be 80% of the page width and it works
> absolutely fine when the text in the text fields are empty or less than
> 80% of the page width.
>
> What happens when the text is longer than that though is that the page
> is created to be the width of the text that would be in the text field
> if it were all on one line and then the text field is scaled back to
> 80% of that.
>
> So on particularly long entries it could double the screen width.
> Generally it would be a case of putting in a text box which is
> multiline but by and large it isn't necessary other than on a few odd
> entries where they are entering more text.
>
> Does anyone have any idea why this is happening?
>
> Cheers
> AndrewF
>



 
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
trouble with DataCell Width and Width of Textbox Jeff ASP .Net 1 10-08-2008 04:18 AM
Hide textbox / Make textbox not visible (NOT USING visible property) Jurjen de Groot ASP .Net Web Controls 0 05-19-2008 09:50 AM
Scaling data FPGA VHDL 2 02-03-2008 06:19 PM
create textbox at run time and insert data from textbox to database tanmaypatankar ASP .Net 0 12-18-2007 03:47 PM
Scaling numerical data to fit within a boundary. CBlair1986 Ruby 0 04-23-2006 09:01 AM



Advertisments