gatakka
18 Aug 2009, 2:32 AM
Hello, i have issue whit scroll in panels.
i want to have a panel, this panel hase a tbar and another panel. The last panel must hase a scroll bars if content is bigger.
i try different things, but alwajs i do not have scroll bars. No difference if I use autoScroll:true.
here is a litle example
Ext.onReady(function() {
var viewport = new Ext.Viewport({
layout:'fit',
items: new A3p.Main()
})
});
A3p.Main = function(config){
Ext.apply(this, config);
A3p.Main.superclass.constructor.call(this);
};
Ext.extend(A3p.Main,Ext.Panel, {
border: false,
layout:'fit',
initComponent: function() {
this.initLayout();
A3p.Main.superclass.initComponent.call(this);
}
initLayout: function() {
this.items = [{
tbar:[{
text:'adad'
}],
xtype:'panel',
layout:'table',
autoScroll:true,
defaults: {
bodyStyle:'padding:20px'
},
layoutConfig: {
columns: 2
},
items: [{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
}]
}];
}
});
i never see scroll bars. I try whit different layout combinations, but result is the same.
Can someone explay me what i do wrong, maybe i do not understands layouts completly.
i want to have a panel, this panel hase a tbar and another panel. The last panel must hase a scroll bars if content is bigger.
i try different things, but alwajs i do not have scroll bars. No difference if I use autoScroll:true.
here is a litle example
Ext.onReady(function() {
var viewport = new Ext.Viewport({
layout:'fit',
items: new A3p.Main()
})
});
A3p.Main = function(config){
Ext.apply(this, config);
A3p.Main.superclass.constructor.call(this);
};
Ext.extend(A3p.Main,Ext.Panel, {
border: false,
layout:'fit',
initComponent: function() {
this.initLayout();
A3p.Main.superclass.initComponent.call(this);
}
initLayout: function() {
this.items = [{
tbar:[{
text:'adad'
}],
xtype:'panel',
layout:'table',
autoScroll:true,
defaults: {
bodyStyle:'padding:20px'
},
layoutConfig: {
columns: 2
},
items: [{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell A content</p>'
},{
html: '<p>Cell B content</p>'
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
}]
}];
}
});
i never see scroll bars. I try whit different layout combinations, but result is the same.
Can someone explay me what i do wrong, maybe i do not understands layouts completly.