1:基本

    Base class for all Ext components. All subclasses of Component may participate in the automated Ext component lifecycle of creation, rendering and destruction which is provided by the ​​Container​​​ class. Components may be added to a Container through the ​​items​​​ config option at the time the Container is created, or they may be added dynamically via the ​​add​​ method.The Component base class has built-in support for basic hide/show and enable/disable behavior.

   该类继承于Ext.util.Observable,是Ext Js中所有组件的基类,它的所有子类都自动享有了标准Ext Js组件的生命周期,包括创建,渲染和销毁等,它们都自动支持了标准的隐藏/显示以及启用/禁用等操作

    All Components are registered with the ​​Ext.ComponentMgr​​​ on construction so that they can be referenced at any time via ​​Ext.getCmp​​​, passing the ​​id​​.

   All user-developed visual widgets that are required to participate in automated lifecycle and size management should subclass Component (or ​​Ext.BoxComponent​​ if managed box model handling is required, ie height and width management).

   所有组件都允许在Ext.Container及其子类中进行延迟渲染,也可以把组件注册到Ext.ComponentMgr中,这就可以在任何地方使用Ext.getCmp()函数,同时使用id获得对应的组件

2:属性中需要注意的

fieldLabel

The label text to display next to this Component (defaults to ''). Note: this config is only used when this Component...


The label text to display next to this Component (defaults to '').


Note: this config is only used when this Component is rendered by a Container which has been configured to use the ​FormLayout​​ layout manager (e.g. ​​Ext.form.FormPanel​​ or specifying layout:'form').


Also see ​​hideLabel​​​ and ​​Ext.layout.FormLayout​​​.​​fieldTpl​​.

Example use:


new Ext.FormPanel({
height: 100,
renderTo: Ext.getBody(),
items: [{
xtype: 'textfield',
fieldLabel: 'Name'