alloftheabove
30 Jun 2008, 10:06 AM
When I put an Ext.form.TextArea inside an Ext.Panel, the TextArea does not show up. It doesn't even show up if I put it in a FormPanel attached to the Ext.Panel. Why isn't it showing up?
//Ext.ux.CodeEditor
//Created by Alex 'Xander' Crennell
Ext.namespace('Ext.ux');
Ext.ux.CodeEditor = function(cfg){
Ext.apply(this, cfg);
Ext.ux.CodeEditor.superclass.constructor.call(this);
};
Ext.extend(Ext.ux.CodeEditor, Ext.Component, {
width: this.width || 400,
height: this.height || 300,
renderTo: this.renderTo || Ext.getBody(),
initComponent: function(){
Ext.ux.CodeEditor.superclass.initComponent.call(this);
},
onRender: function(ct, position){
this.el = new Ext.Panel({
parentEl: ct,
title: 'Ext.ux.CodeEditor',
width: this.width,
height: this.height,
cls: 'ux-cde'
});
this.textarea = new Ext.form.TextArea({ //<---- Not showing up!
grow: true
});
this.formPanel = new Ext.form.FormPanel({
items: this.textarea
});
this.numPanel = new Ext.Panel({
region: 'west'
});
this.centralPanel = new Ext.Panel({
region: 'center',
items: this.formPanel
});
this.borderPanel = new Ext.Panel({
layout: 'border',
items: [this.numPanel, this.centralPanel]
});
this.el.add(this.borderPanel);
this.el.render(this.renderTo);
},
afterRender: function(){
Ext.ux.CodeEditor.superclass.afterRender.call(this);
}
});
Ext.onReady(function(){
editor = new Ext.ux.CodeEditor({renderTo: Ext.getBody()});
}, {delay: 1000});
//Ext.ux.CodeEditor
//Created by Alex 'Xander' Crennell
Ext.namespace('Ext.ux');
Ext.ux.CodeEditor = function(cfg){
Ext.apply(this, cfg);
Ext.ux.CodeEditor.superclass.constructor.call(this);
};
Ext.extend(Ext.ux.CodeEditor, Ext.Component, {
width: this.width || 400,
height: this.height || 300,
renderTo: this.renderTo || Ext.getBody(),
initComponent: function(){
Ext.ux.CodeEditor.superclass.initComponent.call(this);
},
onRender: function(ct, position){
this.el = new Ext.Panel({
parentEl: ct,
title: 'Ext.ux.CodeEditor',
width: this.width,
height: this.height,
cls: 'ux-cde'
});
this.textarea = new Ext.form.TextArea({ //<---- Not showing up!
grow: true
});
this.formPanel = new Ext.form.FormPanel({
items: this.textarea
});
this.numPanel = new Ext.Panel({
region: 'west'
});
this.centralPanel = new Ext.Panel({
region: 'center',
items: this.formPanel
});
this.borderPanel = new Ext.Panel({
layout: 'border',
items: [this.numPanel, this.centralPanel]
});
this.el.add(this.borderPanel);
this.el.render(this.renderTo);
},
afterRender: function(){
Ext.ux.CodeEditor.superclass.afterRender.call(this);
}
});
Ext.onReady(function(){
editor = new Ext.ux.CodeEditor({renderTo: Ext.getBody()});
}, {delay: 1000});