PDA

View Full Version : add element on top of a container



titzu
19 Aug 2009, 1:23 AM
hi,
I need to add a new element to another element but I want to add it on top (first) of other existing elements.

thanks,
titzu

my actual code is


Ext.getCmp('step2').add(fpNew);
Ext.getCmp('step2').doLayout();

Condor
19 Aug 2009, 2:09 AM
Use:

Ext.getCmp('step2').insert(0, fpNew);
Ext.getCmp('step2').doLayout();

Warning: Not all layouts support this (which layout does step2 use?).

titzu
19 Aug 2009, 2:57 AM
thanks
it worked. layout is 'form'