Chinaunix首页 | 论坛 | 博客
  • 博客访问: 610351
  • 博文数量: 96
  • 博客积分: 1464
  • 博客等级: 上尉
  • 技术积分: 1539
  • 用 户 组: 普通用户
  • 注册时间: 2011-11-12 23:24
文章分类

全部博文(96)

文章存档

2013年(29)

2012年(53)

2011年(14)

分类: JavaScript

2013-04-23 17:31:18

TileGroup组件可以很好的用来行列对齐

点击(此处)折叠或打开

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Simple example to demonstrate the Spark Group component. -->
  3. <s:Application xmlns:fx=""
  4.              xmlns:s="library://ns.adobe.com/flex/spark"
  5.              xmlns:mx="library://ns.adobe.com/flex/mx" >
  6.     
  7.     <s:Panel title="TileGroup Component Example"
  8.              width="75%" height="75%"
  9.              horizontalCenter="0" verticalCenter="0">
  10.         <s:VGroup left="10" right="10" top="10" bottom="10">
  11.             
  12.             <s:TileGroup horizontalGap="40" verticalGap="4" requestedColumnCount="3">
  13.                 <s:Button label="1" width="50" height="50" />
  14.                 <s:Button label="2" width="50" height="50" />
  15.                 <s:Button label="3" width="50" height="50" />
  16.                 <s:Button label="4" width="50" height="50" />
  17.                 <s:Button label="5" width="50" height="50" />
  18.                 <s:Button label="6" width="50" height="50" />
  19.                 <s:Button label="7" width="50" height="50" />
  20.                 <s:Button label="8" width="50" height="50" />
  21.                 <s:Button label="9" width="50" height="50" />
  22.             </s:TileGroup>
  23.             
  24.             <s:TileGroup id="test" horizontalGap="120" verticalGap="20" >
  25.                 <s:VGroup id="vGroup">
  26.                     <s:HGroup id="hGroup1">
  27.                         <s:Button label="1" width="50" height="50" />
  28.                         <s:Button label="2" width="50" height="50" />
  29.                         <s:Button label="3" width="50" height="50" />
  30.                     </s:HGroup>    
  31.                     <s:HGroup id="hGroup2">
  32.                         <s:Button label="4" width="50" height="50" />
  33.                         <s:Button label="5" width="50" height="50" />
  34.                         <s:Button label="6" width="50" height="50" />
  35.                         <s:Button label="7" width="50" height="50" />
  36.                         <s:Button label="8" width="50" height="50" />
  37.                         <s:Button label="9" width="50" height="50" />
  38.                     </s:HGroup>
  39.                 </s:VGroup>
  40.             </s:TileGroup>
  41.             
  42.         </s:VGroup>
  43.     </s:Panel>
  44.     
  45. </s:Application>
效果图:
注意:第二个TileGroup的horizontalGap设置的值没有用啊





阅读(5167) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~