469,572 Members | 1,199 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,572 developers. It's quick & easy.

Horizontal Scroll Bar for listbox

I have searched wide and far through google for a solution to no avail. Is
there a method available to add a horizontal scroll bar to a listbox in
asp.net.

Thanks in advance
Nov 17 '05 #1
2 2185
Lloyd,

It's not directly possible. This has nothing to do with ASP.NET. Rather,
it is a limitation of the HTML select element (which is how the ASP.NET
listbox is rendered in the browser). One workaround would be to wrap your
wide listbox in a div or span of the desired width, then set the wrapper
element to use a scrollbar on horizontal overflow. e.g.:

<div style="width:80px; overflow-x:auto">
<asp:ListBox id=YourListBox runat="server"></asp:ListBox>
</div>

HTH,
Nicole
"Lloyd Sheen" <sq*******************@tostopspamhotmail.com> wrote in message
news:Pu*******************@news04.bloor.is.net.cab le.rogers.com...
I have searched wide and far through google for a solution to no avail. Is there a method available to add a horizontal scroll bar to a listbox in
asp.net.

Thanks in advance

Nov 17 '05 #2
A listbox is just a SELECT element.
If you need horizontal scrolling, wrap the listbox with a DIV or SPAN.
A

"Lloyd Sheen" <sq*******************@tostopspamhotmail.com> wrote in message
news:Pu*******************@news04.bloor.is.net.cab le.rogers.com...
I have searched wide and far through google for a solution to no avail. Is there a method available to add a horizontal scroll bar to a listbox in
asp.net.

Thanks in advance

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Max | last post: by
2 posts views Thread by Tina | last post: by
4 posts views Thread by André Nobre | last post: by
7 posts views Thread by Pachydermitis | last post: by
1 post views Thread by Mae Lim | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.