• 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

Adding horizontal scroll bars to list box

 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can i add horizontal scroll bar to list box ??
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can not

Eric
 
ravindra patil
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is it ?? i read that you can add scrollbar using CSS , just define height and width attribuite and use that class in any html element it will automatically add scroll bar , i am trying that but i dont know how to import that it in jsp and even then is no clue whether its get added or not as no error no exceptions..
my css code

.listBox-auto {
width: 35%;
height: auto;
}
<Select clas="listBox-auto" .....
></select>
help me out
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't

Eric
 
ravindra patil
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ha ha ,,, you got angree ??

anyways i added scrollbar tp div tag and put Select in Div tag

<style type="text/css">
.scrollable{
overflow: scroll;
width: 250px; /* adjust this width depending to amount of text to display */
/* adjust height depending on number of options to display */
/* border: 1px silver solid; */
}
.scrollable select{
border: none;
}
</style>






<div class="scrollable">
<select name="SubstanceList" class="listBox-auto" id="SubstanceList" multiple width="250" style="width: 250px" size="5" onChange="javascript:validateSelection();">
<option> </option>

</select></div>



it casuse problem it add both horizontal scrollbar and vertical ,
even select tag itself provides vertical scrollbar so i am seeing to vertical scrollbars , need to avoid 1

help
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
UseCodeTags
 
ravindra patil
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i did not get you
 
Rancher
Posts: 425
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ravindra patil wrote:i did not get you


What Bear means is, please use code tags when you post some code, since it's very difficult to read code in the absence of the code tags. Read this for more information.
 
ravindra patil
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok ... i have pasted code considering you will understand it as its looks simple code
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ravindra patil wrote:i have pasted code considering you will understand it as its looks simple code


Unformatted code is very hard to read -- even for "simple code".

Most people, myself included, will not bother to read code unless you put it in code tags. ShowSomeEffort!
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well you did not add scrollbars to the select

You probably want auto instead of scroll.

Eric
 
ravindra patil
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok i will try but dont think replacing scroll by auto will do as initially it was set to auto i will confirm once again and let you know


 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you even know what auto is?

I love when people say it will not work before they try it.

Eric
 
ravindra patil
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric , i am currently fixing bugs we almost have 140 bugs to fix .do you know why my lead gets angree on me , because when i stuck to particular issue i try to reolve myself without taking any once help even of javaranch also .... that scrollbar issue what i have added here after i put 3 days efforts on that i know little bit about javascript

finally they need output they dont count what efforts you put into


 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ravindra patil wrote:Hi Eric , i am currently fixing bugs we almost have 140 bugs to fix .do you know why my lead gets angree on me , because when i stuck to particular issue i try to reolve myself without taking any once help even of javaranch also .... that scrollbar issue what i have added here after i put 3 days efforts on that i know little bit about javascript

finally they need output they dont count what efforts you put into



angree = angry

Sounds like you need a new job.

Eric
 
ravindra patil
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes ... do you have any for me
i am ready to relocate
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ravindra patil wrote:Yes ... do you have any for me
i am ready to relocate



You already failed my interview...lol..

So did auto work or did my idea fail?

Eric
 
ravindra patil
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no i haven't try yet will try and let you know .. i am not failed in your interview ..
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic