PDA

View Full Version : custom xtype



rebingw
9 Apr 2013, 1:44 AM
hello i am new to extjs i would like to create a custom xtype and use is as an item in other components. eg. i would like to create a component with 3 text fields. can anyone point me in the right direction plz.

Farish
9 Apr 2013, 3:31 AM
Take a look at the example code on the following link. You need to define an alias for the component you are extending and then you can use that alias as the xtype while creating components.

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.Class-cfg-alias

In the example provided on this link, you can add items config and put textfields or whatever you want in it. Then when you create a component with this alias, it will be like what you want.

rebingw
9 Apr 2013, 3:45 AM
thx somuch