gpt4 book ai didi

apache-flex - Flex : Remove OK Button from Alert. 显示?

转载 作者:行者123 更新时间:2023-12-04 02:37:02 26 4
gpt4 key购买 nike

我可以从默认显示的 Alert.Show() 消息中删除确定按钮吗?

谢谢

更新:

private var myAlert : Alert;

public function showAlert( message: String, title : String ) : void
{
hideAlert();

myAlert = Alert.show( message, title);
}

public function hideAlert() : void
{
if( myAlert != null && myAlert.visible ) {
myAlert.visible = false;
}
}

最佳答案

这也应该有效:

import mx.core.mx_internal;
use namespace mx_internal;

private var theAlert:Alert;

public function showAlert():void
{
theAlert = Alert.show("Saving Changes...", "", Alert.OK);
theAlert.mx_internal::alertForm.removeChild(
theAlert.mx_internal::alertForm.mx_internal::buttons[0]);
}

public function hideAlert():void
{
PopUpManager.removePopUp(theAlert);
}

关于apache-flex - Flex : Remove OK Button from Alert. 显示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1707923/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com