Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between doLayout() and doComponentLayout() in Sencha Touch?

As the title says, what is the difference between calling doLayout() and doComponentLayout() for a component in Sencha Touch? I tried having a look at the documentation, but it did not clearly explain this.

like image 712
Nicodemuz Avatar asked Apr 14 '11 01:04

Nicodemuz


1 Answers

The two are actually quite different. doLayout is a container method used to set the sizes of child components within the container. doComponentLayout is a component method used to size the elements (typically) that make up that component.

doLayout does not explicitly propagate to child containers; but since layouts are setSize driven, any changes in size to child components will trigger the appropriate ComponentLayout -> ContainerLayout.

like image 176
rdougan Avatar answered Nov 12 '22 02:11

rdougan