Reputation: 4763
I want to use fieldContainer below is my code for that..
Ext.onReady(function () {
Ext.QuickTips.init();
var myViewport = new Ext.Viewport({
layout: 'border',
border: false,
renderTo: Ext.getBody(),
items: [{
region: 'north',
xtype: 'panel',
id: 'north-panel',
border: false,
height: 125
}, {
region: 'center',
xtype: 'panel',
id: 'center-panel',
border: false,
items: [{
xtype: 'fieldcontainer',
fieldLabel: 'Time worked',
combineErrors: false,
layout: 'hbox',
defaults: {
flex: 1,
hideLabel: true
},
items: [{
name: 'hours',
xtype: 'textfield',
width: 48,
allowBlank: false
}, {
name: 'minutes',
xtype: 'button',
width: 10,
text: 'add'
}]
}]
}]
});
});
Now when I run this code I am not able to see textfield or button.
Suggest me the solution please.
Upvotes: 0
Views: 5057
Reputation: 1024
You should use fieldcontainer within fieldset.
And put layout: 'hbox' in the fieldset.
Upvotes: 5