This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

SPower presents ...



I have programmed a scrolling actor, which lets you scroll over a big image. I call that class ScrollView. I also added a List class, and if you put that in a scroll view, you get a very useful result.

The scroll view on the left is one to show how to use it with an image, and the one on the right is a demo of a scroll view with a list in it. The cells inside the list can be fully customized.

Look in the documentation of the classes how to use them

6674 views / 17 in the last 7 days

7 votes | 0 in the last 7 days

Tags: mouse with-source scrolling scroll list cells

This scenario is a member of: Reusable actors & support classes, Scrolling games

open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Fri Jun 29 14:21:55 UTC 2012 Really small bug fix.
A new version of this scenario was uploaded on Mon Jul 02 09:35:12 UTC 2012 -Fixed bugs -Renamed List to ListView, because it was is a real pain if you want to use this List along with the List datatype (java.util.List)




@-nic- Thanks! And, can you click 'like' please?


Well done! It would be much better, if you would add, that you can scroll with the mousewheel, too! :)


I'll take a look at it.


I don't think that's possible with greenfoot, but it's possible with other IDEs
SPower, take a look at this scenario:


Maybe take a look at the documentation of the 'Mouse'-class in this scenario: The class can help you to add a scrolling with the mouse wheel! :)


Well, I've already tried it some time ago, but it seems there's a bug in the scroll bar class I'm using, and I guess I won't have time to look at it the coming time.

See all comments

Want to leave a comment? You must first log in.

Who likes this?

Entity1037 FlyingRabidUnicornPig USBest -nic- darkmist255 Denzien erdelf