Extjs scrollable panel

2020-04-02 01:37发布

问题:

I have a panel where I insert some HTML from the server:

myPanel.update(response.responseText);

But if this text is too big, none of the scrollbars appear to navigate the text.

How can I configure a vertical scrollbar in this panel?

This is my panel definition:

{
  xtype:'panel',
  width: '100%',
  height: 300,
  id:'mypanel'
},

Thanks.

回答1:

Basically you would just add the autoScroll property like

autoScroll: true

Here's a working JSFiddle



回答2:

...or if you always want a vertical scrollbar

overflowY: 'scroll'


回答3:

Actually you should have two properties together:

autoScroll: 'true'

and

height: 300

They work together, one without the other will not produce the scroll bar.



标签: Extjs extjs4