PDA

View Full Version : BorderLayout Panel scroll()



JeffHowden
28 Mar 2007, 11:36 PM
The various classes that make BorderLayout, regions, etc. all work are way beyond me. I can build them, but hacking around in the associcated JS files makes my head spin. So, rather than even try this myself, I'd like to put an item in the suggestion box.

The object that getRegion() returns should have a scroll() method. Minimally it should take x and y values. Ideally it'd also support some sort of easing setting and have shortcuts for telling it to scroll all the way to the top or bottom (as string alternatives to the y value) and left or right (as string alternatives to the x value).

Animal
29 Mar 2007, 12:46 AM
Region just needs to export the scrolling methods of its bodyEl Element.

scroll() scrolls by a number of pixels.

scrollTo() scrolls to a certain pixel position.

So what you want is available, it just needs to be exposed by the Region.

Both methods take an animate flag which I guess offers some kind of easing.