Hey,
I'am doing my first steps with the Designer and now I have a question about the code the Designer is creating.
This is for example the code it creates:
PHP Code:
Ui = Ext.extend(Ext.Window, {
title: 'New Window',
width: 384,
height: 224,
layout: 'auto',
activeItem: 0,
initComponent: function() {
this.fbar = {
xtype: 'toolbar',
items: [
{
xtype: 'button',
text: 'Neuer Button'
},
{
xtype: 'button',
text: 'Abbrechen'
}
]
};
this.items = [
{
xtype: 'fieldset',
title: 'Field One',
layout: 'form',
items: [
{
xtype: 'combo',
fieldLabel: 'Label',
anchor: '100%',
store: 'TheDataStore',
shadow: false,
hideLabel: true
}
]
},
{
xtype: 'fieldset',
title: 'Field Two',
layout: 'form',
items: [
{
xtype: 'textfield',
fieldLabel: '',
anchor: '100%',
hideLabel: true
}
]
}
];
Ui.superclass.initComponent.call(this);
}
});
I want my fields as new objects which are created before and then get listet in the item tag of the window.
Something like this:
PHP Code:
Field1 = new Ext.form.Checkbox({
id: 'Field1',
fieldLabel: 'Field1',
checked: true,
width: 50,
allowBlank: true
});
Field2 = new Ext.form.Checkbox({
id: 'Field2',
fieldLabel: 'Field2',
checked: true,
width: 50,
allowBlank: true
});
TheNewWindow = new Ext.Window({
id: 'TheNewWindow',
title: 'The Window',
closable: true,
width: 575,
height: 700,
plain: true,
layout: 'fit',
closeAction: 'hide',
items:[Field1,Field2],
buttons: [{
text: 'Abbrechen'
}]
});
Is this possible?
Thank you!