Hi,
I have a form with 2 labels and 2 fields, a textarea and a combo. I want to have the label on top of the textarea, and the other label on top of the combo. I want the textarea to be 100% width and the combo about 70% width. But I want the combo to be flush left, underneath its label, and this isn't happening with the following code:
Code:
var form = new Ext.form.FormPanel({
baseCls : 'x-plain',
labelWidth : -4,
layout : 'form',
items: [{
xtype : 'label',
text : 'Content:'
},{
xtype : 'textarea',
name : 'content',
anchor : '100% -70',
}, {
anchor : '100% -70',
xtype : 'label',
text : 'Style:'
}, {
anchor : '70% -40',
xtype : 'combo',
}]
});
var win = new Ext.Window({
draggable : false,
resizable : false,
title : 'Create popup',
width : 500,
height : 300,
minWidth : 300,
minHeight : 200,
layout : 'fit',
plain : true,
bodyStyle : 'padding:5px;',
buttonAlign : 'right',
items : form,
buttons: [{
text : 'Save'
},{
text : 'Cancel'
}],
});
win.show();
I also tried absolute and couldn't do any better, though I think that absolute layout might be a better idea.
Andy