PDA

View Full Version : GridPanel Scroll disapear when in TabPanel



shlomio
16 Dec 2009, 6:57 AM
Hi There,

i have been dealing with that for days and found no answers in the forum yet:

I have a window with 'border' layout, in the window i have 3 items
a FormPanel - region:center
a GridPanel - region:north
a TabPanel - region:center, hidden:true

when clicking a button i hide the Form & the Grid and show the Tab.

inside the TabPanel i have a GridPanel that renders without scrolling.

I found out that when i changed the window's layout to 'fit' - i can see the scrolling but i must use the border layout for the Grid & the Form to be arranged together.

I also tried to wrap the Tab in a Panel with layout 'fit' - but no scrolling was found in the GridPanel !

some code:

the window
new Window({
title:'windowTitle',
width:1200,
height:500,
layout:'border', //when changed to 'fit' i can see scroll but can't see other items
iconCls:'icon-grid',
shim:false,
plain : true,
animCollapse:false,
constrainHeader:true,
items: [myTabPanel,
myGridPanel(), //an ordinary GridPanel
myFormPanel()])} //an ordinary FormPanel

the TabPanel
var myTabPanel = new TabPanel({
region:'center',
hidden:true,
defaults : {
layout : 'fit'
},
activeItem : 0,
items : [
gridPanelWithNoScrolling //an ordinary GridPanel
]});






please help !

thanks !

Shlomi.

Mike Robinson
16 Dec 2009, 7:00 AM
++

I have also seen this: a grid that clearly refers to a data-store with a large number of rows in it, but that contains no scrollbar.

Animal
16 Dec 2009, 7:36 AM
Only if it has not been SIZED by the layout manager of its parent!

The docs go on and on and on and on and on about this at every possible mention of the fact that you can put Components into Containers.

CHOOSE A LAYOUT!

shlomio
16 Dec 2009, 1:16 PM
Hi Animal,

When there is no good tutorial that gets you from A to Z you pick up those hints piece by piece.
Thanks for the answer but although ext isn't new to me i didn't understand it...

Shlomi.