Reputation: 37
I find it is impossible to show text label with column layout. I tried many configuration. Label fields still do not show up. Here is my code:
var contactPanel = new Ext.form.FormPanel(
{
bodyStyle:"padding:5px",
items:
[
{xtype:"fieldset",title:"Customer",html:"XXX COMPANY LIMITED"},
{xtype:"fieldset",title:"Contact Person",items:[
new Ext.Panel
({
bodyStyle:"padding:0px 0px 0",labelAlign:'right',border:false,items:
[{
layout:"column",border:false,defaults:{border:false,defaults:{xfield:"form",defaultType:'textfield',anchor:'95%'}},
items:[
{columnWidth:.05,html:"<span style='font-size:14px;position:absolute;'>English Name</span>"},
{columnWidth:.25,items:[new App.common.ArrayComboBox({width:120,fieldLabel: "Title", data:['Dr','Mr','Ms'], value:2})]},
{columnWidth:.35,items:[{width:220,fieldLabel:'Surname',xtype:'textfield',value:"Lau"}]},
{columnWidth:.35,items:[{fieldLabel:'Given Name',xtype:'textfield',value:"Alan"}]},
{columnWidth:.7,items:[{fieldLabel:'Customer Name',xtype:'textfield'}]},
{columnWidth:.5,items:[{fieldLabel:'Responsibility',xtype:'textfield'}]}
]
}]
})
]}
]
});
Upvotes: 1
Views: 2310
Reputation: 717
Labels are shown in panels of 'form' layout. Try to modify defaults of your inner panel to this (add layout: 'form'):
defaults:{border:false, layout: 'form',defaults:{xfield:"form",defaultType:'textfield',anchor:'95%'}}
Upvotes: 1