K..
K..

Reputation: 4223

Setting a panel in an hbox layout to the parent height?

I had a panel with a child-panel with a fit layout.

Now I want to add a second childpanel on the right, so I set the layout to hbox and added the second panel after the first.

But now the children don't have the height of the parent anymore.

The flex option took care of the width, what takes care of the height?

Upvotes: 3

Views: 2950

Answers (1)

Johan Haest
Johan Haest

Reputation: 4421

The align, it does an autoheight by default (the height of you panel). But you can make it stretch to the parent container by adding this in the layout:

layout: {
   type: 'hbox',
   align: 'stretch'  //stretch vertically to parent
}

An explenation here: http://docs.sencha.com/ext-js/4-1/#!/api/Ext.layout.container.HBox-cfg-align

Upvotes: 3

Related Questions