EXT的Form 布局
Form 布局由类Ext.layout.FormLayout 定义,名称为form,是一种专门用于管理表单中
输入字段的布局,这种布局主要用于在程序中创建表单字段或表单元素等使用。看下面的代
码:
Ext.onReady(function(){new Ext.Panel({renderTo:"hello",title:"容器组件",width:300,layout:"form",hideLabels:false,labelAlign:"right",height:120,defaultType: 'textfield',items:[{fieldLabel:"请输入姓名",name:"name"},{fieldLabel:"请输入地址",name:"address"},{fieldLabel:"请输入电话",name:"tel"}] });});
Ext.onReady(function(){new Ext.form.FormPanel({renderTo:"hello",title:"容器组件",width:300,labelAlign:"right",height:120,defaultType: 'textfield',items:[{fieldLabel:"请输入姓名",name:"name"},{fieldLabel:"请输入地址",name:"address"},{fieldLabel:"请输入电话",name:"tel"}] });});