File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding horizontal scroll bars to list box

 
ravindra patil
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i add horizontal scroll bar to list box ??
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not

Eric
 
ravindra patil
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't

Eric
 
ravindra patil
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
 
ravindra patil
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i did not get you
 
Pushkar Choudhary
Rancher
Posts: 425
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok ... i have pasted code considering you will understand it as its looks simple code
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes ... do you have any for me
i am ready to relocate
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no i haven't try yet will try and let you know .. i am not failed in your interview ..
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic