Resizing labels so they fit on one line

Discussion in 'ASP .Net Web Controls' started by Jim Bancroft, Jul 18, 2005.

  1. Jim Bancroft

    Jim Bancroft Guest

    Hi everyone,

    I'm using a Web control label to display some text on-screen. I'd like
    to dynamically set the width property during the page load, so that the
    label is wide enough to accomodate the text I assign to it, without
    wrapping.

    Is there a reccomended way to do this? I've been fiddling around with stuff
    like multiplying the text length by the font size, but so far it hasn't
    worked...thanks!
     
    Jim Bancroft, Jul 18, 2005
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vertigo
    Replies:
    10
    Views:
    921
    Not in my trousers
    Jul 6, 2003
  2. news.frontiernet.net
    Replies:
    6
    Views:
    1,431
    news.frontiernet.net
    Apr 16, 2004
  3. Noozer
    Replies:
    3
    Views:
    653
    Noozer
    Apr 23, 2004
  4. ghiro
    Replies:
    20
    Views:
    1,553
  5. Noozer
    Replies:
    22
    Views:
    31,289
    Noozer
    Jan 17, 2005
  6. Piet
    Replies:
    0
    Views:
    826
  7. Biranchi Narayan Panda

    using ajax to show data in multiple labels one by one...

    Biranchi Narayan Panda, Feb 18, 2010, in forum: ASP .Net
    Replies:
    2
    Views:
    1,187
    Biranchi Narayan Panda
    Feb 20, 2010
  8. Jean-Sébastien

    resizing html to fit in dispplayed window

    Jean-Sébastien, Apr 22, 2007, in forum: Javascript
    Replies:
    2
    Views:
    157
Loading...