View Full Version : Label for a ComboBox
kvishal
13 Sep 2010, 8:44 PM
Can anyone tell, how to insert label for a ComboBox? I means a descriptive label which appears in front of the ComboBox.
vishalnnsingh
13 Sep 2010, 8:46 PM
add this as one of your config option:
{
fieldLabel:'urLabelName',
}
kvishal
13 Sep 2010, 8:49 PM
Well I have already tried this. But for some reason the label is not appearing.
vishalnnsingh
13 Sep 2010, 8:53 PM
then it must be a layout problem, please try changing the layout, still if it does not work, then please post your code.
dev_java
13 Sep 2010, 9:21 PM
if the your layout is mentioned as 'column' , fieldLabel wont be visible
vishalnnsingh
13 Sep 2010, 9:24 PM
that's not true, if the layout is column, then you have to define the items accordingly.
Condor
14 Sep 2010, 12:18 AM
fieldLabels are only visible in a form layout.
If you are using a different layout then you need to nest an extra container, e.g.
layout: 'column',
items: [{
xtype: 'container',
columnWidth: 0.5,
layout: 'form',
items: {
xtype: 'textfield',
fieldLabel: 'Field 1',
anchor: '100%'
}
},{
xtype: 'container',
columnWidth: 0.5,
layout: 'form',
items: {
xtype: 'textfield',
fieldLabel: 'Field 2',
anchor: '100%'
}
}]
kvishal
14 Sep 2010, 1:58 AM
thank you. that solved the issue.
Powered by vBulletin® Version 4.2.3 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.