radio和checkBox的用法:

radio和checkBox的用法:
配置内容:

  1. (function(){
  2. Ext.onReady(function(){
  3. new Ext.form.Panel({
  4. title:'Ext.form.field.checkBox和Ext.form.field.Radio示例',
  5. bodyStyle:'padding 5 5 5 5 ',
  6. frame:true,
  7. height:150,
  8. width:400,
  9. renderTo:'form',
  10. defaults:{
  11. labelSeparator:':',
  12. labelWidth:80,
  13. width:200,
  14. labelAlign:'left'
  15. },
  16. items:[{
  17. xtype:'radio',
  18. name:'sex',
  19. fieldLabel:'性别',
  20. boxLabel:'男'
  21. },{
  22. xtype:'radio',
  23. name:'sex',
  24. fieldLabel:'性别',
  25. boxLabel:'女'
  26. },{
  27. xtype:'checkboxfield',
  28. name:'swim',
  29. fieldLabel:'爱好',
  30. boxLabel:'游泳'
  31. },{
  32. xtype:'checkboxfield',
  33. name:'walk',
  34. fieldLabel:'爱好',
  35. boxLabel:'散步'
  36. }]
  37. });
  38. });
  39. })();
显示效果:






posted @ 2014-07-28 22:02  thero  阅读(503)  评论(0编辑  收藏  举报