4

I am using extjs to build a portal and I have the following problem. The images are more than the height of the tab (on the right size). What I want is to add a vertical scroll bar on this tab. How can I do this in extjs?

This is the part of my code:

   items: [{
                xtype: 'tabpanel',
                activeTab: 0,
                flex: 2,
                items: [{
                        xtype: 'panel',
                        title: 'Images',
                        items: [{contentEl:'img',autoScoll: true,height:11200,overflowY : String }]
                 },{    
                        xtype: 'panel',
                        title: 'Material',
                        items: [{contentEl:'msg',autoScoll: true,height:11200,overflowY : String }]
                        }]
            }]

Thanks.

user1919
  • 3,818
  • 17
  • 62
  • 97

4 Answers4

7

I can see in your code autoScoll instead of autoScroll: true. It seems to be a typo. Check this out.

abarisone
  • 3,707
  • 11
  • 35
  • 54
4

Try adding layout:fit and autoScroll:true.

varunm
  • 61
  • 2
2

Have you tried this -

overflowY: 'scroll'

Here's what it says in the documentation -

'scroll' to always enable vertical scrollbar (Style overflow-y: 'scroll').

http://docs.sencha.com/extjs/5.1/5.1.0-apidocs/#!/api/Ext.Component-cfg-overflowY

Yellen
  • 1,785
  • 16
  • 35
2

For ExtJS 6 you can use Ext.panel.Panel.scrollable.

To enable vertical scroll you can set it as scrollable: 'vertical'.

To force vertical scroll regardless of content you can pass Ext.scroll.Scroller config:

scrollable: {
    y: 'scroll'
}
Sergey Novikov
  • 4,096
  • 7
  • 33
  • 59