Styling the Alert Control's status message

Source: Internet
Author: User
The following example shows how you can customize the appearance of the status message in an alert control in Flex by setting Statusstylename Style and Status Property <? XML version = "1.0" encoding = "UTF-8" ?>
<! -- Http://blog.flexexamples.com/2008/01/03/styling-the-alert-controls-status-message/ -->
< MX: Application Xmlns: MX = "Http://www.adobe.com/2006/mxml"
Layout = "Vertical"
Verticalalign = "Middle"
Backgroundcolor = "White"
Creationcomplete = "Init ();" >

<MX: Style>
@ Font-face {
SRC: Local ("Comic Sans MS ");
Fontfamily: mycomicsansms;
Fontweight: normal;
}

Alert {
Statusstylename: mycustomstatusstylename;
}

. mycustomstatusstylename {
color: red;
fontfamily: mycomicsansms;
fontsize: 10;
fontweight: normal;
}< br> mx: style >

<MX: script>
<! [CDATA [
Import MX. Controls. Alert;

Private var alert: alert;

Private function Init (): void {
VaR mymessage: String = "lorem ipsum dolor sit Amet, consectetuer adipiscing elit. \ ndonec tincidunt sollicitudin Sem .";
VaR mytitle: String = "The quick brown fox jumped over the lazy dog ";
Alert = alert. Show (mymessage, mytitle );
Alert. Status = "status message ";
}
]>
</ MX: script >

mx: applicationcontrolbar dock =" true " >
mx: button label =" Launch alert " click =" Init (); " />
mx: applicationcontrolbar >

</MX: Application>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.