如何维护ExtJs FormPanel中滚动条的位置
展开全部
FormPanel.el.getScroll();//得到滚动条对象
//对象内容{left:(scrollLeft),top:(scrollTop)}
anobjectcontainingthescrollpositionintheformat{left:(scrollLeft),top:(scrollTop)}
FormPanel.el.isScrollable();//判断对象是否可以滚动
scroll(方向,滚动多少,是否动画);
scroll(Stringdirection,Numberdistance,[Boolean/Objectanimate]):Boolean
Scrollsthiselementthespecifieddirection.Doesboundscheckingtomakesurethescrolliswithinthiselement'sscrollablerange.
Parameters:
*direction:String方向参数l:左边滚动,r:右边滚动,t:上边滚动,b:下滚动
Possiblevaluesare:"l"(or"left"),"r"(or"right"),"t"(or"top",or"up"),"b"(or"bottom",or"down").
*distance:Number
Howfartoscrolltheelementinpixels
*animate:Boolean/Object
(optional)trueforthedefaultanimationorastandardElementanimationconfigobject
Returns:
*Boolean
Returnstrueifascrollwastriggeredorfalseiftheelementwasscrolledasfarasitcouldgo.
scrollIntoView([Mixedcontainer],[Booleanhscroll]):Ext.Element
scrollTo(往哪滚动,滚动多少,动画否);
scrollTo(Stringside,Numbervalue,[Boolean/Objectanimate]):Element
Scrollsthiselementthespecifiedscrollpoint.ItdoesNOTdoboundscheckingsoifyouscrolltoaweirdvalueitwilltrytodoit.Forautoboundschecking,usescroll().
Parameters:
*side:String
Either"left"forscrollLeftvaluesor"top"forscrollTopvalues.
*value:Number
Thenewscrollvalue
*animate:Boolean/Object
(optional)trueforthedefaultanimationorastandardElementanimationconfigobject
Returns:
*Element
this
//对象内容{left:(scrollLeft),top:(scrollTop)}
anobjectcontainingthescrollpositionintheformat{left:(scrollLeft),top:(scrollTop)}
FormPanel.el.isScrollable();//判断对象是否可以滚动
scroll(方向,滚动多少,是否动画);
scroll(Stringdirection,Numberdistance,[Boolean/Objectanimate]):Boolean
Scrollsthiselementthespecifieddirection.Doesboundscheckingtomakesurethescrolliswithinthiselement'sscrollablerange.
Parameters:
*direction:String方向参数l:左边滚动,r:右边滚动,t:上边滚动,b:下滚动
Possiblevaluesare:"l"(or"left"),"r"(or"right"),"t"(or"top",or"up"),"b"(or"bottom",or"down").
*distance:Number
Howfartoscrolltheelementinpixels
*animate:Boolean/Object
(optional)trueforthedefaultanimationorastandardElementanimationconfigobject
Returns:
*Boolean
Returnstrueifascrollwastriggeredorfalseiftheelementwasscrolledasfarasitcouldgo.
scrollIntoView([Mixedcontainer],[Booleanhscroll]):Ext.Element
scrollTo(往哪滚动,滚动多少,动画否);
scrollTo(Stringside,Numbervalue,[Boolean/Objectanimate]):Element
Scrollsthiselementthespecifiedscrollpoint.ItdoesNOTdoboundscheckingsoifyouscrolltoaweirdvalueitwilltrytodoit.Forautoboundschecking,usescroll().
Parameters:
*side:String
Either"left"forscrollLeftvaluesor"top"forscrollTopvalues.
*value:Number
Thenewscrollvalue
*animate:Boolean/Object
(optional)trueforthedefaultanimationorastandardElementanimationconfigobject
Returns:
*Element
this
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询