PDA

View Full Version : Hi need help with scroll tab panel



bsord
21 Jan 2011, 5:15 PM
my example
MainPanel = function () {

this.tbr = new Ext.Panel({
id: 'preview-tbr',
border: false,
cls: 'preview',
autoScroll: false
});

this.preview = new Ext.Panel({
id: 'preview',
border: false,
cls: 'preview',
autoScroll: true
});

this.previewTab = new Ext.TabPanel({
id: 'previewTab',
activeTab: 0,
plain: true,
autoTabs: true,
//height:,
border: true,
resizeTabs: true,
defaults: { autoScroll: true },
tabWidth: 150,
minTabWidth: 120,
enableTabScroll: true,
title: 'Loading...',
items: this.preview
});

MainPanel.superclass.constructor.call(this, {
id: 'main-tabs',
region: 'center',
autoScroll: false,
items: [
{
//autoScroll: false,
id: 'main-view',
title: 'Emax Desktop System ...',
items: [
this.tbr,
this.previewTab
]
}]
});
};

Ext.extend(MainPanel, Ext.Panel, {
setTbr: function (btns) {
var ptbr = Ext.getCmp('preview-tbr');
ptbr.body.update("<div id='dtbr'></div>");
var t = new Ext.Toolbar({
renderTo: "dtbr",
items: btns
});
},
goPage: function (title, html) {
try {
var o = Ext.getCmp('preview');
o.setTitle(title);
o = Ext.getCmp('previewTab');
o.body.update(html);
o.setAutoScroll(true);
} catch (e) {
alert("goPage:" + e);
}
}
});

if i put content to preview - with big area i not looking scroll when autoScroll:true ????????????
Please help!!!!:((