ListBox Width

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matthew Wieder

    #1

    ListBox Width

    I have the common problem of the text for some of the items in my
    listbox exceeds the width of the listbox. The solution oft proposed of
    not setting the width and thereby having the listbox automatically scale
    to the size of the data is helpfull, but it messes up the look of the
    page if the box is empty or only short strings are in the box. What I'd
    like to do, is have the listbox width set to a certain ammount and only
    if a string exceeds a certain number of characters, have the listbox
    width scale. I can't seem to find how to "unset" the listbox width
    attribute via C# codebehind. Does anyone know how to do this?
    thanks!

Working...