Extjs将面板滚动到一个位置 [英] Extjs scrolling a panel to a position

查看:64
本文介绍了Extjs将面板滚动到一个位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个面板,我想滚动到该面板中的特定帖子我如何做?

Hi i have a panel and i want to scroll to a particular postiton in that panel how do i do it

var tabs= new Ext.Panel({
    id:id,      
    title:text,
    autoScroll:true,
    iconCls:'windowIcon',
    closable:true,
    closeAction:'hide'
});


推荐答案

将面板的body的scrollTop属性设置为数字您要向下滚动的像素:

Set the scrollTop property of the panel's body to the number of pixels you want to scroll down:

// Scroll the body down by 100 pixels.
tabs.body.dom.scrollTop = 100;

这篇关于Extjs将面板滚动到一个位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆