In many cases, we need to scroll the scroll bar of the rolling view to the bottom, such as the call record. The following code is introduced:
The first is to obtain scroller. In fact, all items such as dataview, list, And nestlist contain scrallable, which is a combination of view and scroller. To scroll, we need to get scroller.
Scroller = Ext. getCmp ("myRecord"). getScrollable (). getScroller ();
Use the getScrollable () method of dataview to obtain the scrollable object, and then use the getScroller () method to obtain the scroler object.
After obtaining this object, you can call the scrollToEnd () method to scroll directly to the bottom or use the scrollTo method.
The scrollTo method has three parameters: abscissa, ordinate, and animation.
Animation Parameters are optional.
Scroller. scrollTo (0, scroller. getSize (). y-scroller. getContainerSize (). y );
I don't quite understand the meaning of this code, but it does. I will try again later.