加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Flex mxml调用mxml 设置窗口居中

发布时间:2020-12-15 03:47:44 所属栏目:百科 来源:网络整理
导读:1、???? //关闭登录用户框 ?? ??? ??? ?import mx.events.CloseEvent; ?? ??? ??? ?import mx.managers.PopUpManager; ?? ??? ??? ?private? function titlewindow_closeHander(event:CloseEvent):void ?? ??? ??? ?{ ?? ??? ??? ??? ?PopUpManager.removePo

1、???? //关闭登录用户框
?? ??? ??? ?import mx.events.CloseEvent;
?? ??? ??? ?import mx.managers.PopUpManager;
?? ??? ??? ?private? function titlewindow_closeHander(event:CloseEvent):void
?? ??? ??? ?{
?? ??? ??? ??? ?PopUpManager.removePopUp(this);
?? ??? ??? ?}


2、居中设置

把<mx:Application?? 改为<s:TitleWindow

?????????? import mx.managers.PopUpManager;

??????????? import mx.core.FlexGlobals; ?? ??? ??? ?//注册新用户 ?? ??? ??? ?private function linkbtnRegeditUser_clickHandler(event:MouseEvent):void ?? ??? ??? ?{ ?? ??? ??? ??? ?// TODO Auto-generated method stub ?? ??? ??? ??? ?var UserRegedit:UserRegister=UserRegister(PopUpManager.createPopUp(this,UserRegister,true)); ?? ??? ??? ??? ?//设置弹出窗口剧中 ?? ??? ??? ??? ?PopUpManager.centerPopUp(UserRegedit);?? ? ?? ??? ??? ??? ? ?? ??? ??? ??? ?//居中设置 ?? ??? ??? ??? ?UserRegedit.x=FlexGlobals.topLevelApplication.stage.stageWidth/2-UserRegedit.width/2;? ??? ??? ??? ??? ? ?? ??? ??? ??? ?UserRegedit.y=FlexGlobals.topLevelApplication.stage.stageHeight/2-UserRegedit.height/2; ?? ??? ??? ?}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读