• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use horizontal_scroll bar to html:select

 
purushotham podaralla
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • 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
 
Jerry Mahone
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
 
ashok chittela
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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">
<htmlptionsCollection 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic