• ExtJS专题(十):layout布局的使用(2)


  • anchor
  • 这个效果具体还不知道有什么用,就是知道注意一下 
    1.容器内的组件要么指定宽度,要么在anchor中同时指定高/宽, 
    2.anchor值通常只能为负值(指非百分比值),正值没有意义, 
    3.anchor必须为字符串值 
图形结果演示:
。net代码 
  1. Ext.onReady(function() {  
  2.         var panel1 = new Ext.Panel({  
  3.             title: "panel1",  
  4.             height: 100,  
  5.             anchor: '-50',  
  6.             html: "高度等于100,宽度=容器宽度-50"  
  7.         });  
  8.   
  9.         var panel2 = new Ext.Panel({  
  10.             title: "panel2",  
  11.             height: 100,  
  12.             anchor: '50%',  
  13.             html: "高度等于100,宽度=容器宽度的50%"  
  14.   
  15.         });  
  16.   
  17.         var panel3 = new Ext.Panel({  
  18.             title: "panel3",  
  19.             anchor: '-10, -250',  
  20.             html: "宽度=容器宽度-10,高度=容器宽度-250"  
  21.   
  22.         });  
  23.   
  24.         var win = new Ext.Window({  
  25.             title: "Anchor Layout",  
  26.             height: 400,  
  27.              400,  
  28.             plain: true,                      
  29.             layout'anchor',  
  30.             items: [panel1, panel2,panel3]              
  31.         });  
  32.         win.show();  
  33.     });  

  • 相关阅读:
    vue Syntax Error: Unexpected token {
    MQ 分拆Json数据包然后上传
    京东商城投诉商家
    C# 读写Txt文件
    DB2时间函数 实现 时间加减
    VS恢复默认设置
    只用一次循环开销 将类似 1 A 、1 B 的数据返回成为 1 A,B 的拼接形式
    DB2 With语句递归
    属性与字段的区别
    With语句在数据统计应用
  • 原文地址:https://www.cnblogs.com/Leo_wl/p/1683445.html
  • Copyright © 2020-2023  润新知