我在 adobe flex 中有一个标题窗口开始像。我是 flex 的初学者。
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:mate="http://mate.asfusion.com/"
width="190" height="350"
creationComplete="initDefaultMic()"
styleName="micSettingsWindowStyle"
showCloseButton="false"
verticalCenter="10" horizontalCenter="10"
close="onCancelClicked()"
keyDown="handleKeyDown(event)">
我已经给出了 verticalCenter="10"horizontalCenter="10"
并期望它应该对齐
相应地而不是居中对齐。
但每次它都居中对齐。我也尝试过清除浏览器缓存。
这里是使用manager创建pop的逻辑
var micWarning:MicWarning = new MicWarning();
micWarning.micsettings = this;
PopUpManager.addPopUp(micWarning, this, true);
// PopUpManager.centerPopUp(micWarning);
请告诉我我可能做错了什么。
我也尝试定义 x 和 y 坐标,但这也不起作用。
最佳答案
verticalCenter="10"和 horizontalCenter="10"不起作用。
我打算做那样的事
var micWarning:MicWarning = new MicWarning();
var verticalCenter:int = 10;
var horizontalCenter:int = 10;
micWarning.x = FlexGlobals.topLevelApplication.width / 2 - micWarning.width / 2 + verticalCenter;
micWarning.y = FlexGlobals.topLevelApplication.height / 2 - micWarning.height / 2 + horizontalCenter;
PopUpManager.addPopUp(micWarning, FlexGlobals.topLevelApplication as DisplayObject, true);
关于css - 对齐 Flex 弹出窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24647991/