Extjs可滚动面板

Bee*_*ice 20 extjs extjs4

我有一个面板,我从服务器插入一些HTML:

myPanel.update(response.responseText);
Run Code Online (Sandbox Code Playgroud)

但是如果此文本太大,则不会出现导航文本的滚动条.

如何在此面板中配置垂直滚动条?

谢谢.

更新:

这是我的面板定义:

{
  xtype:'panel',
  width: '100%',
  height: 300,
  id:'mypanel'
},
Run Code Online (Sandbox Code Playgroud)

sra*_*sra 26

基本上你只需要添加autoScroll属性

autoScroll: true
Run Code Online (Sandbox Code Playgroud)

这是一个有效的JSFiddle


Rob*_*gar 9

...或者如果你总是想要一个垂直滚动条

overflowY: 'scroll'
Run Code Online (Sandbox Code Playgroud)


Oct*_*nel 6

实际上你应该有两个属性:

autoScroll: 'true'
Run Code Online (Sandbox Code Playgroud)

height: 300
Run Code Online (Sandbox Code Playgroud)

它们一起工作,一个没有另一个不会产生滚动条.