• Post Reply Bookmark Topic Watch Topic
  • New Topic

Scrollpane  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
1) i want the scrollpane to display only the Horizontal or the vertical scrollbar how do i do this.
2) i also want my scrollbar to always be scrolling down rather than up.
any ideas.
rahul
[This message has been edited by rahul_mkar (edited May 30, 2000).]
 
romarusa
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try turning off the default scrolls and add your own. This way you can add the functionality you need by manipulating it in the event.
scrollpane.setScrollPosition(0,scrollbar.getValue())
the getValue() will be either your x or y change, depending on the which scrollbar
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
unfortunately setScrollPosition is not moving to the specified position in the view. for example if i want to move or scroll down every time i press a button i write this in the button event.
scroll.setScrollPosition(0,20);
rahul
 
romarusa
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure you are incrementing your location. If you hardcode the y position to 20 the scrollpane will always go to 0,20 as the upper left hand point in your scrollpane. ( thus will never change!) try getY from the scrollpane and then adding 20 to it. I did the same thing when I added the new scrollbar. This way you take advantage of the scrollpane, and dont have to use the ugly scroll bars that come with it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!