What are the relations or differences between Container, Component, Element and Panel?
Please help.
Panel is a container that has specific functionality and structural components that make it the perfect building block for application-oriented user interfaces. Panels are, by virtue of their inheritance from Ext. container. Container, capable of being configured with a layout, and containing child Components.
ExtJS stands for Extended JavaScript. It is a JavaScript framework and a product of Sencha, based on YUI (Yahoo User Interface). It is basically a desktop application development platform with modern UI.
With a disappearing community, meager documentation, poor performance and significant licensing cost, ExtJS is quickly becoming a deprecated technology.
cls: This is applied to the component's root element. Quoting from the docs: An optional extra CSS class that will be added to this component's Element. This can be useful for adding customized styles to the component or any of its children using standard CSS rules.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With