Scrollable scroll down to the bottom

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.