Extjs4布局详解(六)—Absolute布局

Absolute布局继承Ext.layout.container.Anchor 布局方式,并增加了X/Y配置选项对子组件进行定位,Absolute布局的目的是为了扩展布局的属性,使得布局更容易使用

Absolute布局继承Ext.layout.container.Anchor 布局方式,并增加了X/Y配置选项对子组件进行定位,Absolute布局的目的是为了扩展布局的属性,使得布局更容易使用。

 
  1. Ext.create('Ext.form.Panel', {    
  2.         title: 'MHZG.NET - Absolute Layout',    
  3.         width: 300,     
  4.         height: 275,
  5.         x:20,
  6.         y:90,
  7.         layout:'absolute',    
  8.         defaultType: 'textfield',    
  9.         items: [{
  10.             x: 10,        
  11.             y: 10,         
  12.             xtype:'label',        
  13.             text: 'Send To:'    
  14.         },{
  15.             x: 80,         
  16.             y: 10,        
  17.             name: 'to',         
  18.             anchor:'90%'    
  19.         },{        
  20.             x: 10,         
  21.             y: 40,        
  22.             xtype:'label',        
  23.             text: 'Subject:'    
  24.         },{         
  25.             x: 80,        
  26.             y: 40,        
  27.             name: 'subject',         
  28.             anchor: '90%'
  29.         },{        
  30.             x:0,         
  31.             y: 80,        
  32.             xtype: 'textareafield',        
  33.             name: 'msg',         
  34.             anchor: '100% 100%'
  35.         }],     
  36.         renderTo: Ext.getBody()
  37.     });

 

Absolute Layout

效果图

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值