谁能告诉我如何才能让tbar
和之间的这个小余量FormPanel
消失?我希望工具栏适合它出现的形式。
代码:
var form_customer_contact = new Ext.FormPanel({
frame:true,
labelWidth: 90,
labelAlign: 'right',
title: 'Customer Contact',
bodyStyle:'padding:0',
width: 300,
height: 600,
autoScroll: true,
itemCls: 'form_row',
defaultType: 'displayfield',
tbar: [{
text: 'save',
iconCls: 'icon_green_check',
handler: function(){
window_wrapper.hide();
var show_button_click_result = new Ext.Panel({
title: 'Invoice Address',
width: 290,
height: 200,
html: 'customer contact saved',
frame: true,
border: true,
header: true
});
replaceComponentContent(small_box_upper_left, show_button_click_result, true);
}
}, '-', {
text: 'send protocol to customer',
iconCls: 'icon_arrow_box_upper_right',
handler: function(){
var show_button_click_result = new Ext.Panel({
title: 'Invoice Address',
width: 290,
height: 200,
html: 'protocol sent to customer',
frame: true,
border: true,
header: true
});
replaceComponentContent(small_box_upper_left, show_button_click_result, true);
}
}],
items: [{
fieldLabel: 'Customer Type',
name: 'customerType',
allowBlank:false,
value: 'Company'
},{
fieldLabel: 'Item 20',
name: 'item20',
value: 'test'
}, {
fieldLabel: 'Item 21',
name: 'item21',
value: 'test'
}, {
xtype: 'button',
text: '<span style="color:red">Cancel Order</span>',
anchor: '100%',
handler: function() {
var show_button_click_result = new Ext.Panel({
title: 'Invoice Address',
width: 290,
height: 200,
html: 'You cancelled the order.',
frame: true,
border: true,
header: true
});
replaceComponentContent(small_box_upper_left, show_button_click_result, true);
}
}
]
});
附录
感谢@Johnathan,余量已用完,这是有效的代码及其外观:
#form_customer_information .x-panel-ml,
#form_customer_information .x-panel-mr,
#form_customer_information .x-panel-mc
{
padding:0px;
}