Using the titlewindow container to display status messages

Source: Internet
Author: User

Another example of something I 've seen lately on the Internet, so I thought I 'd build it in flex. this time I USEA titlewindow to display the status message of a login form. you can close the message by clicking the X button in the upper-right corner of the title window.

Note that there is no correct login. it will display the error message every time. in a future example I'll try and add some fancy fade in/out effects or resize effects on the error message to give it that proper "Web 2.0 feel"

<? XML version = "1.0" encoding = "UTF-8" ?>
<! -- Http://blog.flexexamples.com/2007/08/22/using-the-titlewindow-container-to-display-status-messages/ -->
< MX: Application Xmlns: MX = "Http://www.adobe.com/2006/mxml"
Layout = "Vertical"
Verticalalign = "Middle"
Backgroundcolor = "White" >

mx: style >
titlewindow {
cornerradius: 0;
backgroundcolor: red;
bordercolor: red;
borderalpha: 1.0;
}< br> mx: style >

mx: script >

private function showtitlewindow (): void {
titlewindow. height = 28;
}

Private function hidetitlewindow (): void {
Titlewindow. Height = 0;
}
]>
</MX: script>

< MX: vbox >
< MX: titlewindow ID = "Titlewindow"
Title = "Invalid username and/or password ."
Showclosebutton = "True"
Width = "100%"
Height = "0"
Close = "Hidetitlewindow ()"   />

< MX: Form >
< MX: formitem Label = "Username :" >
< MX: textinput ID = "Username"
Maxchars = "24"   />
</ MX: formitem >
< MX: formitem Label = "Password :" >
< MX: textinput ID = "Password"
Maxchars = "24"
Displayaspassword = "True"   />
</ MX: formitem >
< MX: formitem >
< MX: button Label = "Login"
Click = "Showtitlewindow ()"   />
</ MX: formitem >
</ MX: Form >
</ MX: vbox >

</MX: Application>

Reprinted from: http://www.cnblogs.com/taobataoma/archive/2008/01/11/1035794.html

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.