12

I have a simple grid/panel that is located under a tab.

I cant get it to be in 100% height of the parent tab.

How do you do it?

height:'100%'

and

viewConfig:{ forceFit: true }

won't work.

Thanks

Narendra Jadhav
  • 10,052
  • 15
  • 33
  • 44
fatnjazzy
  • 6,070
  • 12
  • 57
  • 83

1 Answers1

13

forceFit does not have anything to do with it.

Often the problem is that your grid need to be inside a container with a "fit" layout.

But I cannot help you more without some code.

Drasill
  • 3,917
  • 29
  • 30
  • 1
    This is correct. The tab panel containing the grid should have layout:'fit'. – Brian Moeskau Oct 03 '10 at 00:20
  • @bmoeskau - the tab panel itself uses CardLayout and you wouldn't want to fiddle with that, right ? I assume you meant to nest the grid in a container that will be the direct child of the tab panel and have layout:'fit' on the container. – ob1 Oct 03 '10 at 08:08
  • 4
    I meant "the panel that *is* the tab" should have layout:'fit' not the TabPanel itself. Each tab within the TabPanel is a panel and requires a layout if containing other components. Alternately the GridPanel could itself be a direct child of TabPanel (without a separate containing layer) and would then require no separate layout declaration. I suspect the OP is doing TabPanel -> Panel (no layout) -> GridPanel. – Brian Moeskau Oct 03 '10 at 09:01