PDA

View Full Version : autoScroll bar



larryan
8 Jan 2013, 2:28 PM
Hi,
I have a form setting autoScroll to true. I added multi grids into the form dynamically. When the form shows up, I clicked on the form (actually, on any line in the grids that's in the view currently) for the first time (not second time), the form scroll down to a certain distance based on how big the content in the form. I don't know why the form scrolled. This is happening only when I for the first time click on the form. I think the form shouldn't scroll if I don't scroll it.
How can I stop this unwanted scrolling? any idea will appreciate.
Thanks
Larry

friend
9 Jan 2013, 5:54 AM
This sounds like an issue with the parent container and it's layout/sizing policy.

larryan
9 Jan 2013, 3:09 PM
AM
Friend, Thank you for your answer.
Below is my code. Is any thing wrong for my layout setting? Please advise.

Ext.define('LP.view.MyPanel', {
extend: 'Ext.panel.Panel',
alias: 'widget.mypanel',


layout: 'border',
bodyPadding: 10,
initComponent: function () {
var me = this;
Ext.apply(this, {
items: [
{
xtype: 'container',
layout: 'hbox',
region: 'south',
cls: 'button-container',
items: [{
xtype: 'button',
text: LP.localStrings.save,
itemId: 'saveButton',
disabled: true,
margin: '0 10 0 0'
}, {
xtype: 'button',
text: LP.localStrings.cancel,
disabled: true,
itemId: 'cancelButton'
}]
},
{
xtype: 'baseform',
region: 'center',
autoScroll: true,
border: 0,
items: [
{
}
]
}
]
});
this.callParent(arguments);
},