PDA

View Full Version : [Solved] Scrollbar issue in tabpanel embedded in panel



ssayen
22 Jun 2010, 7:39 AM
Hello,

I have a panel which contains a tabpanel because I need a title zone above the tabs.
The tabs content is updated later in the process with html provided by a json request.

Everything is working fine, except one thing : I can't manage to locate the vertical scrollbar on the tabpanel body, it's (at best) located on top panel. So I loose title and tabs when scrolling down.

Here is a light version of my Ext code :

The container panel factory return :


return new mxcOpd.Panel(Ext.apply({
title: 'Sans titre'
,width: '50%'
,split: true
,items: [
new mxcOpd.TabPanel(Ext.apply({
deferredRender: false
,activeTab: 0
,items: [
new Ext.Panel({
title: 'Version originale'
})
,new Ext.Panel({
title: 'Modifications'
})
]
}))
]
}, config));


And a tabPanel update (which works fine) like this is called later :


ficheLeft.getComponent(0).getComponent(0).body.update(
'<div class="ct-preview-fiche">' + jsonResponse.data.tgt.param.html + '</div>'
);


I tried many things like setting autoscroll to false on the panel and true on the tabs, setting layout to "fit" on the panel, but the scrollbar just disappears.
I tried to perform a doLayout() on tab after update too, with no change.

Any idea is welcome, thanks.

ssayen
22 Jun 2010, 9:47 PM
Never mind I solved that.

I had to put layout option to "fit" and force autoscroll to "true" on panels under the tabpanel (and not the tabpanel itself ! :">)

Lorenzo