
Ext.ux.TextPanel = Ext.extend(Ext.Panel, {

	setText: function (txt) {
		this.el.update(txt);
	} 
	
	,cfg: {}
	
	,defaultPanelCfg: {
		autoHeight: true
		,border: false
		,style: 'padding: 5px;'
		,txt: ''
	}
	
	,onRender: function () {
		Ext.ux.TextPanel.superclass.onRender.apply(this, arguments);
		if (this.txt)
			this.setText(this.txt);
	}
	
	,initComponent: function () {
		
		var _cfg = {};
		
		Ext.apply(_cfg, this.cfg, this.defaultPanelCfg);	
		
		Ext.apply(this, _cfg);
		
		Ext.ux.TextPanel.superclass.initComponent.apply(this, arguments);
		
	}
	
});

Ext.reg('ux.textpanel', Ext.ux.TextPanel);
