Flex中如何通过showCloseButton属性控制TitleWindow右上角关闭按钮有效/无效的例子

By Minidxer | January 22, 2009

接下来的例子演示了Flex中如何通过showCloseButton属性,控制TitleWindow右上角关闭按钮有效/无效。

让我们先来看一下Demo可以右键View Source或点击这里察看源代码):


下面是完整代码(或点击这里察看):

Download: main.mxml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
  3.         layout="horizontal"
  4.         verticalAlign="middle"
  5.         backgroundColor="white">
  6.  
  7.     <mx:TitleWindow id="titleWindow1"
  8.             showCloseButton="true"
  9.             title="TitleWindow"
  10.             status="showCloseButton = true"
  11.             width="50%"
  12.             height="100%" />
  13.  
  14.     <mx:TitleWindow id="titleWindow2"
  15.             showCloseButton="false"
  16.             title="TitleWindow"
  17.             status="showCloseButton = false"
  18.             width="50%"
  19.             height="100%" />
  20.  
  21. </mx:Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子

Topics: TitleWindow | 1 Comment » | 2,623 views Tags: ,

Search Posts