listbox text wrapping

pangolin_10

Member
Joined
Sep 2, 2005
Messages
14
Location
India
Programming Experience
1-3
hi,
i have got a listbox on a webform with the listbox's width as 120 px ( it has to be that, can not increase the width). now when i am adding items to the listbox, items that have a bigger length are not wrapped up in the listbox as it happens with text boxes. Suppose , i add an item 'dd' , then its ok, but if the item is 'dddddddddddddd', then only a part of the item is shown and the rest goes out of the boundary of the listbox and i am unable to view the full text.
plzz help.
 
believe it or not, this is not possible. At the Microsoft PDC in September I asked the Internet Explorer team this exact question. They told me it is not possible. I also asked them about dynamically stretching the width to fit the longest entry. They said this also was not possible. I also asked them about putting a tooltip on each entry that would pop-up to reveal the full text, this also is not possible.

The only solutions I can recommend would be to:
1 - widen your dropdown list box
2 - create your own dropdown list box using javascript menu-type functionality
3 - use javascript events to create your own tooltip-type popups, for example using the window.createPopup() http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/createpopup.asp
 
Back
Top