问题:Extjs2.0 form如何使用checkbox和radiobox
答
想到三个办法:
一是标签使用panel+html;
二是通过3个fieldset进行布局;
{ xtype:"form", title:"Form", items:[{ xtype:"fieldset", autoHeight:true, layout:"column", items:[{ xtype:"fieldset", autoHeight:true, columnWidth:0.5, items:[{ xtype:"radio", fieldLabel:"Label", boxLabel:"Box label", name:"radio", inputValue:"radiovalue" }] },{ xtype:"fieldset", autoHeight:true, columnWidth:0.5, hideLabels:true, items:[{ xtype:"radio", boxLabel:"Box label", name:"radio", inputValue:"radiovalue", hideLabels:true }] }] }] }
三.采用panel+3个item的方式;
xtype:"panel", fieldLabel:"审核状态", layout:"table", items:[{ html:"审核状态:" },{ boxLabel:"审核通过", name:"rb-auto", inputValue:1, checked:true, xtype:"radio" },{ boxLabel:"审核不通过", name:"rb-auto", inputValue:2, xtype:"radio" }]
四是采用extjs2.2或者更新 有checkgroup和radiogroup控件的