• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to use horizontal_scroll bar to html:select

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

i am using html:select struts tags, and inside i am using html ption, html ptionsCollection....

in html ptionsCollection i am using one collection, while displaying the values from collection by using html ptionsCollection, the size of the html:select is increased, as the value from html ption is very big string, some cases, the values are small strings, so the size of html:select is getting reduced.

<html:select name="xxxxxFB" property="mindIDs" >
< html ptionsCollection property="mindId" labelProperty="mindName"/>
</html:select>

i need to attach one horizontal_scroll bar to html:select, so that if the values of mindId big, i can scroll though the values, but my size of html:select should not change for different values.

please do the needful.
Thanks in advance.

regards,
purushotham
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has anyone else run into this problem? Like the OP, I am having this same problem. Generally, the recommended solution for putting horizontal scroll bars in a straight html <select> element is to surround the select with a <div> and use overflow-x: scroll and overflow:-moz-scrollbars-horizontal. This works great for html's <select> element. However, when I tried this with <html:select> where I am filling the control with <html:optionsCollection> data, I get a horizontal scroll bar alright, but only the arrows and track are displayed. Even though there is definitely data that is wider than the select element, the slider does not appear, so the scrollbar is useless.

Ideas?

Thanks,
Jerry
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do have the same problem.I have the code like below in my jsp page

<div style="width:800px;overflow:auto;">
<html:select multiple="true" property="selectedZones" size="10">
<html:optionsCollection property="zoneList" value="areaCode" label="name"/>
</html:select>
</div>

I want both horizontal and vertical bars to get displayed.

Any quick help is really appreciated.

Thanks,
Ashok.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic