PDA

View Full Version : Collapse / expand button disappeared.



Active2
3 Dec 2009, 1:59 AM
Hi,

The first code I write was spaghetti code with Extjs, at the point i couldn't manage the code anymore I decided to do a step back and start over again.

I've created a set of preconfigured classes with properties I like etc.. and now the problem:

When I do:


Ext.ns("CL");

CL.BottomRegion = Ext.extend(Ext.Panel, {
region: "south",
title: "Log",
split: true,
height: 100,
minSize: 100,
maxSize: 200,
collapsible: true,
collapsed: true,
margins: "0 0 0 0"
});


And add it to the viewport then the collapse / expand button is disappeared.

When I directly add it with:


new Ext.Panel({
region: "south",
title: "Log",
split: true,
height: 100,
minSize: 100,
maxSize: 200,
collapsible: true,
collapsed: true,
margins: "0 0 0 0"
})


Then everything is fine and the expand / collapse button is there.

Well, I think I mis something, but after reading docs and other resources I couldn't find an answer to this question.

Regards,

Active2
3 Dec 2009, 3:53 AM
I wrongly applied the configuration. I've done it this way now and it worked:


Ext.apply(this, Ext.apply(this.initialConfig, config));


In the initComponent function.

Regards,