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

Flex Alert出一个带超链接的提示框

发布时间:2020-12-15 01:14:59 所属栏目:百科 来源:网络整理
导读:? 有这个想法,然后看了下flex的Alert的源码,发现alert出来的按钮、内容文本框其实都在一个AlertForm类实例中,这个实例在Alert类成员中的定义是: /** ??? *? @private ??? *? The internal AlertForm object that contains the text,icon,and buttons ???
?

有这个想法,然后看了下flex的Alert的源码,发现alert出来的按钮、内容文本框其实都在一个AlertForm类实例中,这个实例在Alert类成员中的定义是:


/**
??? *? @private
??? *? The internal AlertForm object that contains the text,icon,and buttons
??? *? of the Alert control.
??? */
??? mx_internal var alertForm:AlertForm;

而其内容文本框在AlertForm中的定义是:


/**
???? *? The UITextField that displays the text of the Alert control.
???? */
??? mx_internal var textField:IUITextField;

ok,相信大家都知道该怎么做了,也就是在mx_internal命名空间下,把这个textfield提取出来,设置其htmltext即可,当然,你也可以进行其他的操作。
源码如下:


var alert:Alert = Alert.show("","提示");
var tf:IUITextField = alert.mx_internal::alertForm.mx_internal::textField;
tf.autoSize = TextFieldAutoSize.CENTER;
tf.htmlText = "<a href='http://www.asarea.cn' target='_blank'><b><font color='#ffffff' size='13'>欢迎访问ASAREA</font></b></a>";


文章来自: 闪客居(www.flashas.net) 详文参考:http://www.flashas.net/as/20090414/4029.html

(编辑:李大同)

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

    推荐文章
      热点阅读