PDA

View Full Version : Add horizontal scrollbar to FormPanel in window



extjser12
12 Apr 2012, 2:44 AM
Hello together

Can somebody say me the correct way to achieve that a FormPanel in a Window gets a horizontal scrollbar if it's bigger than the width of the window? The config "autoScroll: true" doesn't work. Maybe you can give me an example.

Thanks in advance!

Kind regards, extjser12

scottmartin
12 Apr 2012, 6:20 AM
Does this work as expected?



Ext.define('MyApp.view.MyWindow', {
extend: 'Ext.window.Window',

height: 250,
width: 400,
autoScroll: true,
title: 'My Window',

initComponent: function() {
var me = this;

Ext.applyIf(me, {
items: [
{
xtype: 'form',
width: 1000,
bodyPadding: 10,
title: 'My Form'
}
]
});

me.callParent(arguments);
}

});

Ext.create('MyApp.view.MyWindow', {

}).show();


Regards,
Scott.