ExtJS 4 / Sencha Touch Container, Component, Element and Panel

拥有回忆 提交于 2019-12-01 03:44:55

问题


What are the relations or differences between Container, Component, Element and Panel?

Please help.


回答1:


If briefly...

Element is wrapper for DOM element.

Component is basic class for all widgets.

Container is subclass of Component. It can have "items" (i.e. Container can contain other components).

Panel is subclass of Container. It can have header, footer, toolbars, and other docked items.

You can find more info in Layouts & Containers and Components




回答2:


For Sencha Touch, Container and Panel are currently (as of 2.0 beta) the same except for 3 attributes that are deprecated.

http://docs.sencha.com/touch/2-0/#!/api/Ext.Panel

They are essentially interchangeable. This may change in the future to match up closer to Ext 4.0 where a Panel has footers, headers and toolbars while a container doesn't.



来源:https://stackoverflow.com/questions/6722520/extjs-4-sencha-touch-container-component-element-and-panel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!