flex应用程序:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
import com.model.titleWindow;
import mx.collections.ArrayCollection;
import mx.core.FlexGlobals;
import mx.managers.PopUpManager;
public var titleWindows:titleWindow ;
protected function button1_clickHandler(event:MouseEvent):void
{
/* if(titleWindows.visible){
PopUpManager.removePopUp(titleWindows);
} */
var doctypes:ArrayCollection=new ArrayCollection(["*.as","*.mxml","*.swc"]);
titleWindows = titleWindow(PopUpManager.createPopUp(this,titleWindow,true));
/* titleWindows.addEventListener("close", removeMe); */
/* titleWindows["cancelButton"].addEventListener("click", removeMe); */
/* titleWindows["okButton"].addEventListener("click", submitData); */
/* titleWindows.owner = this;
PopUpManager.addPopUp(titleWindows,this,true);
PopUpManager.centerPopUp(titleWindows); */
titleWindows.myArray=doctypes;
/*
var test:titleWindow = titleWindow(PopUpManager.createPopUp(this,titleWindow,true,null)); */
titleWindows.x=FlexGlobals.topLevelApplication.stage.stageWidth/2-titleWindows.width/2;
titleWindows.y=FlexGlobals.topLevelApplication.stage.stageHeight/2-titleWindows.height/2;
}
/* private function submitData(event:Event):void {
ti1.text = String(titleWindows.cb1.selectedItem);
//removeMe();
PopUpManager.removePopUp(titleWindows);
} */
// Cancel button click event listener.
private function removeMe(event:Event):void {
PopUpManager.removePopUp(titleWindows);
}
]]>
</fx:Script>
<s:Button x="243" y="223" label="点击弹出" click="button1_clickHandler(event)"/>
<s:TextInput x="219" y="80" id="user"/>
<s:TextInput x="219" y="137" id="pass"/>
<s:TextInput x="488" y="163" id="ti1"/>
</s:Application>
titlewindow模块:
<?xml version="1.0" encoding="utf-8"?>
<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300"
close="titlewindow1_closeHandler(event)">
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.events.CloseEvent;
import mx.events.FlexEvent;
import mx.managers.PopUpManager;
protected function titlewindow1_closeHandler(event:CloseEvent):void
{
// TODO Auto-generated method stub
PopUpManager.removePopUp(this);
}
protected function tw_click():void
{
var test:taecsMouble = this.owner as taecsMouble ;
test.user.text = this.user.text;
test.pass.text = this.pass.text;
}
[Bindable]
public var myArray:ArrayCollection;
]]>
</fx:Script>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
</fx:Declarations>
<s:TextInput x="146" y="94" id="user"/>
<s:TextInput x="151" y="139" id="pass"/>
<s:Button x="209" y="199" label="按钮" click="tw_click()"/>
<s:DropDownList x="62" y="186" dataProvider="{myArray}"></s:DropDownList>
</s:TitleWindow>
分享到:
相关推荐
Flex-TitleWindow的弹出窗口中播放一段影像.zip Flex-TitleWindow的弹出窗口中播放一段影像.zip Flex-TitleWindow的弹出窗口中播放一段影像.zip
flex4.6 可以拉伸的TitleWindow。自由缩放。
Flex TitleWindow父子页面的事件派发
flex TitleWindow自定义最大最小化
这是一个flex4的项目,可以下载下来单独运行,项目中是一个自定义的TitleWindow,TitleWindow中存放了一个dataGrid,它可以根据dataGrid中数据行增加而改变自身高度,直至要最大高度。此组件使用mxml定义,重写了...
主要介绍了Flex中TitleWindow传值思路及实现,需要的朋友可以参考下
flex主页面与弹出窗口之间数据传输的示例
flex TitleWindow 放大、缩小、可缩放 弹出窗口 直接把mytest项目导入flexBuilder可直接运行mytest.mxml看效果。
flex中为titlewindow添加更多按钮,使其显示在标题栏右方
Flex自定义组件,带最大化、最小化、还原及关闭按钮。
重写titlewindow,带最小化、最大化、关闭按钮,方便前端使用
flex监听浏览器关闭事件,完成对于浏览器关闭事件的监听。以及弹出相应的关闭提示
NULL 博文链接:https://176170847.iteye.com/blog/774691
Flex特效_可拖动弹出窗口布局容器TitleWindow.zip )
NULL 博文链接:https://sunshineyao.iteye.com/blog/827432
Flex带最大化最小化按钮可拖动调整窗口大小的TitleWindow
在Flex里,一般的弹出窗口(除了Alert以外)都可以用TitleWindow组件完成,主窗口和TitleWindow的数据传输可以用以下方法
可以自由改变大小的TitleWindow 的学习项目
4.Flex美化应用 24 4.1使用组件样式-Using Styles 24 4.2 动画效果Effect-Using Behaviors 26 4.3使用皮肤-Creating Skin 28 5.Flex通信 30 5.1 与HTTPService交互 30 5.2 与WEBService交互 30 5.2.1WebService简介 ...