PDA

View Full Version : [CLOSED][3.0 svn 5413] Different behavior ViewPort



wki01
25 Sep 2009, 6:04 AM
I know it's a bad way to write the code but has always worked until now.
It works fine with 3.0.0 but has a problem with the last svn.
In particular, no longer appears the vertical scroll bar.
See attached images.

thanks


Ext.onReady(function() {
var center = new Ext.TabPanel({
region: 'center',
activeTab: 0,
items:[{
autoScroll: true,
contentEl: 'PANEL-TAB1',
title: 'TAB1'
},{
autoScroll: true,
contentEl: 'PANEL-TAB2',
title: 'TAB2'
},{
autoScroll: true,
contentEl: 'PANEL-LOG',
title: 'TAB3'
}]
})

north = new Ext.Panel ({
region: 'north',
autoHeight: true,
split: true,
autoScroll: true,
items: [{
contentEl: 'PANEL-MAIN',
title: "TRIANGOLAZIONE"
}]
})


var viewport = new Ext.Viewport({
layout: 'border',
items:[{
region: 'center',
renderTo: 'VIEWPORT-RENDER',
layout: 'border',
items:[
north,
center,
new Ext.Panel({
region: 'south',
height: 86
})
]
}]
});
viewport.doLayout();
});

Animal
25 Sep 2009, 6:33 AM
Why use Panels?



var center = new Ext.TabPanel({
region: 'center',
activeTab: 0,
items:[{
xtype: 'box',
autoScroll: true,
el: 'PANEL-TAB1',
title: 'TAB1'
},{
xtype: 'box',
autoScroll: true,
el: 'PANEL-TAB2',
title: 'TAB2'
},{
xtype: 'box',
autoScroll: true,
el: 'PANEL-LOG',
title: 'TAB3'
}]
})

Animal
25 Sep 2009, 6:35 AM
remove this line:



renderTo: 'VIEWPORT-RENDER',


How can you think of render when you use it as a child Component?

wki01
25 Sep 2009, 6:52 AM
remove this line:



renderTo: 'VIEWPORT-RENDER',
How can you think of render when you use it as a child Component?

I have the same problem with this thread, and that until now was a good solution.

http://www.extjs.com/forum/showthread.php?t=37138

Now no longer works.

Condor
25 Sep 2009, 7:57 AM
As Animal said, you can't use renderTo inside a container.

Why do you have renderTo:'VIEWPORT-RENDER'?

Is it to use an existing <form> element as the thread you linked to described? You should solve that with the 'el' config option (see reply in linked thread).