【发布时间】:2011-09-30 10:04:25
【问题描述】:
<fx:Script>
private function showSuccessDialog(msg:String):void
{
var label:Label = new Label();
label.text = msg;
label.width = 290;
label.x = 20;
label.y = 30;
var btnok:Button = new Button();
btnok.label = "OK";
btnok.width = 100;
btnok.x = 100;
btnok.y = label.y + 30;
titleWindow = new TitleWindow();
titleWindow.title = "Success";
titleWindow.width = 300;
//when i add this two elements label and button both are displayed on same position
//my label size increases dynamically so i want to add that button below that label
//here for titleWindow i want to set layout how i can do that
titleWindow.addElement(label);
titleWindow.addElement(btnok);
PopUpManager.addPopUp(titleWindow, this, true);
PopUpManager.centerPopUp(titleWindow);
}
</fx:Script>
【问题讨论】:
-
我删除了黑莓标签,因为这个问题与黑莓或 RIM 无关。我还编辑了问题,将所有代码置于“代码格式”中——有一个大括号按钮,您可以在以后的问题中使用它。也就是说,在您的实际问题是代码中 cmets 的一部分的情况下发布问题是不寻常的。
标签: apache-flex actionscript-3