View Full Version : How to include External code in Extjs

4 May 2011, 4:22 AM
I`v created a suggestion textbox out of Extjs, and i want include that in my Extjs form.
can i do that?

4 May 2011, 5:36 AM
use ext.extend to make an extension, you can easily use it in your form after that, you can also use the new keyword to make an object and then use it in your form

4 May 2011, 9:11 AM
See this excellent article by Animal: http://www.sencha.com/learn/Tutorial:Creating_new_UI_controls

4 May 2011, 10:37 PM
Very easy!

<script type="text/javascript">
Ext.ux.Text = Ext.extend(Ext.Component, {
autoEl: {
tag: 'input',
type: 'text'
onRender: function() {
this.autoEl = Ext.apply({}, this.initialConfig, this.autoEl);
Ext.ux.Text.superclass.onRender.apply(this, arguments);
this.el.on('load', this.onLoad, this);
onLoad: function() {
this.fireEvent('load', this);
Ext.reg('text', Ext.ux.Text);


xtype: 'text',
isFormField: true,
fieldLabel: 'text',
qtip: 'text Tooltip'