`
Blackbaby
  • 浏览: 180601 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

HTML Text in a Flex Alert box

阅读更多

A quick and easy way to render HTML text with the body of a Flex Alert box.

There is no API to set the htmlText property of the Alert text field, but you can access it using the mx_internal namespace.

 

import mx.controls.Alert; 
import mx.core.IUITextField;   
var title:String ="HTML Alert!"; 
var htmlBody:String = "This is my HTML message with <b>Bold</b> text and <br/> HTML formatting <b/>";   
var alert:Alert = Alert.show(str,  htmlBody);   
// now target the Alert text field (after we have opened it) and set the HTML text property use namespace mx.core.mx_internal; 
IUITextField(alert.alertForm.textField).htmlText = htmlBody;

  

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics