View Full Version : Layout Issue

10 Dec 2012, 1:32 AM
Good day for all.
I have a problem with viewport region resizing .

Ext.define("MyApp.view.Viewport", {
extend: "Ext.Viewport",
alias: "widget.Viewport",
border: false,
layout: "border",

initComponent: function() {
var me;
me = this;
me.content = Ext.create("Ext.panel.Panel", {
cls: "wrapper",
border: false

Ext.applyIf(me, {
items: [
region: "center",
id: "cntr",
cls: "body",
items: [me.content],
return me.callParent(arguments);

Sencha layout guide (http://docs.sencha.com/ext-js/4-1/#!/guide/layouts_and_containers) says-

A re-layout is triggered when the Container is resized, or when child Component items are added or removed.

i added component to me.content container when apllication is rendered and showed:


i see added ellement in region, but region not changing size and new items is cut off.
What is my mistake? Thanks for any help.

11 Dec 2012, 1:14 PM
So the me.content panel is not resizing when you add a component in? I did this and it did:

html : 'Test'