Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Horizontal Scrolling on Listbox Possible? 1

Status
Not open for further replies.

NatGreen

Programmer
Apr 19, 2002
90
US
For a windows form listbox there is a Horizontal scrollbar property, but I do not see one for the web forms. Is there anyway to get the horizontal scrolling on a listbox in a web form?

Thanks!
 
To my knowledge no. The html control for a list box will always size itself to the largest element contained within it, so since what is ultimately rendered is html you are stuck with the limitations of html.

If anyone has anything else on this I know I would love to hear how you did it. Crystal
crystalized_s@yahoo.com

--------------------------------------------------

Experience is one thing you can't get for nothing.

-Oscar Wilde

 
As such there is no Horizontal scrollbar property for the web forms. we can have a work around for that. keep the <div></div> tags around the listbox control and adjust the height and width of the div to ur requirements

The sample code looks like this
Code:
<div Style=&quot;overflow:auto; width:100; &quot;>
<SELECT id=select1 size=5 name=select1> 
<OPTION>Very long oneeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee</OPTION>
</SELECT>
</div>
¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤
Have fun
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top