PDA

View Full Version : doLayout() vs doComponentLayout()



cabennett85
2 Aug 2010, 4:54 PM
Hello All,

I'm having a hard time tracking down a distinction in the sencha touch api of when to use doLayout() vs doComponentLayout() (or is one just a shortened version of the other?). Can anyone point me in the right direction of where to read about this?

Also, does doLayout() propagate doLayout() calls for all the child containers of the parent container it's called on?

Thanks,
Cole

TommyMaintz
2 Aug 2010, 5:43 PM
In the build that we are currently uploading, the API docs have been updated to describe the difference between the two. Actually the docs for the next version are already online, so you can already check it out at http://www.sencha.com/deploy/touch/docs/?class=Ext.Container

Jamie Avins
2 Aug 2010, 9:09 PM
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.