I have begun work on yet another Scroll Object - totally new (and hopefully better) code. I am posting what I've got so far cause it's kinda neat. It's nowhere near the completedeness of the current Scroll Object - it doesn't even resemble it at all. The new one is still in 2 pieces and will require a lot more work until it can be used to displace the old one.
What I'm doing this time around is separating the Scroll Object into 2 independent objects: ScrollWindow and ScrollBar. And then one master object, Scroll, will incorporate these 2 to build a true scrollbar/window combination (basically what the existing Scroll Object does). Take a look at the source code to see how I'm building it if you're interested.
The ScrollWindow is sort of like a MiniScroll Widget (the content part), and the Scrollbar is actually a 2-dimensional scrollbar, the new one will be able to scroll horizontally as well as vertically by using 2 instances of this object. In the demo below I have one ScrollBar object that lets you scroll all over the place though. This won't be an option in the forthcoming Scroll Object, but you could implement your own ScrollBar Object like I have done to accomplish such a task.
Take a Look:
View newscroll1.html for a ScrollWindow and ScrollBar combination example
View Source Code
Home | Next Lesson: List Object |