views:

69

answers:

1

Hi,

is there a way to find out which layout type is used for a container.

For instance. When I use the following code to get a container how can I determine the layout type.

comp = Ext.getCmp('<name>');
comp.getLayout();

I only get a layout object but there is no field from the object which tells me the layout type

+1  A: 

You should be able to use "type" I beleive, try this:

var cmp = Ext.getCmp("whatever");
var lyt = cmp.getLayout();

alert(lyt.type);
Lloyd
@Lloyd: thx works perfect
Jeremy S.
If in doubt, inspect the object with Firebug, there's plenty of things that crop up which just aren't documented :)
Lloyd