给Alert加个Icon
很简单只要先 Embed 一个图片 ,然后在Alert.show()的第6个参数加上就可以了
[Bindable]
[Embed(source='assets/error.png')]
private var Icon:Class;
Alert.show(text, title, Alert.YES | Alert.NO, null, alert_close ,Icon);
给Alert组件的标题栏也加个Icon
同样的方法
[Bindable]
[Embed(source='assets/titleIcon.png')]
private var TitleIcon:Class;
我们只要加一句
alert.titleIcon=TitleIcon
就可以了,看效果
本文介绍如何在Flex中为Alert对话框添加图标,包括对话框内的图标和标题栏图标。通过Embed特性引入图片资源,并在Alert显示时指定图标类。
207

被折叠的 条评论
为什么被折叠?



