flex pop-up window
发布时间:2020-12-15 05:04:20 所属栏目:百科 来源:网络整理
导读:参考资料:http://help.adobe.com/en_US/flex/using/WS6c678f7b363d5da52e8f1ca1124a0430dcf-8000.html ? 弹出代码 ?xml version="1.0"?!-- containerssparkmyComponentsMyLoginForm.mxml --s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" xmln
参考资料:http://help.adobe.com/en_US/flex/using/WS6c678f7b363d5da52e8f1ca1124a0430dcf-8000.html ? 弹出代码<?xml version="1.0"?> <!-- containerssparkmyComponentsMyLoginForm.mxml --> <s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark" close="handleCloseEvent();"> <s:layout> <s:VerticalLayout/> </s:layout> <fx:Script> <![CDATA[ import mx.managers.PopUpManager; // Handle the close button and Cancel button. private function handleCloseEvent():void { PopUpManager.removePopUp(this); } // Handle the OK button. private function processLogin():void { // Check credentials (not shown) then remove pop up. PopUpManager.removePopUp(this); } ]]> </fx:Script> <s:Form> <s:FormItem label="User Name"> <!--获取父亲程序的元素--> <s:TextInput id="username" width="100%" text="{parentApplication.login.label}"/> </s:FormItem> <s:FormItem label="Password"> <s:TextInput id="password" displayAsPassword="true" width="100%"/> </s:FormItem> </s:Form> <s:HGroup> <s:Button label="OK" click="processLogin();" /> <s:Button label="Cancel" click="handleCloseEvent();"/> </s:HGroup> </s:TitleWindow>
|