Developing ui using Ext-js
I m new to Ext-js .I m developing a form.but not able to alli开发者_StackOverflow中文版gn it to center. This is my code
Ext.onReady(function()
{
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'side';
var reg_form = new Ext.FormPanel({
renderTo: document.body,
title: 'Employee Registration Form',
width:600,
height:500,
bodyStyle: 'padding:10px 10px 15px 15px;background:#dfe8f6;',
items: [
{
xtype: 'numberfield',
fieldLabel: 'Employee Id',
name: 'id',
decimalPrecision:2,
allowBlank: false
},
{
xtype: 'textfield',
fieldLabel: 'Employee Name',
name: 'name',
allowBlank: false,
vtype:'alpha'
}
]
});
});
Thank you in advanced.
You'll need to apply css
to do that, or use the x
& y
configs of formpanel
One more way to solve this problem: use
Ext.Window({
maximizeble : false,
resizeble : false,
closable: false,
minimizeble: false,
...
})
精彩评论