EXTJS 中 anchor 的用法

本文介绍了ExtJS框架中Anchor属性的使用方法及其与ColumnWidth属性的配合使用原则。通过实例说明了如何设置组件的宽度比例,并强调了Anchor属性不能与Width属性同时使用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

EXTJS 中 anchor 的用法

标签: extjsfunctionlayout任务ext
  6800人阅读  评论(0)  收藏  举报

[html]  view plain  copy
  1. {  
  2.                    columnWidth:0.33,  
  3.                      layout:'form',  
  4.                          items:[{  
  5.                   id:'missiontype',  
  6.                   name:"mission.missiontype",  
  7.                   xtype:'combo',  
  8.                   fieldLabel:'任务类型',  
  9.                   editable:false,  
  10.                   store : gdlxStore,  
  11.                   displayField:'gdlx',  
  12.                    mode:'local',  
  13.                   anchor:'100%',  
  14.                   listeners:{  
  15.                         'select':function(combo, record,index){  
  16.                         dmlxCom.clearValue();   
  17.                         if(this.getValue())  
  18.                           dmlxStore.load({params:{missionType:this.getValue()}});  
  19.                           //gdlxStore.reload();  
  20.                                 }  
  21.                                     }  
  22.          }]  
  23.          }  



 ext中许多组件都有anchor这个属性,他一般与布局column一起使用,以文本组件为例:columnWidth的值乘以anchor的值,即为本组件所占的长度。

另外注意:anchor不可与设置长度的属性width同时出现,否则,width属性无效


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值