How Does Flex pop out the warning dialog box alert

Source: Internet
Author: User
Posted on
May 7, 2010 by hubertfc

Maxcompute:
Alert. Show (text, title, flags, parent, eventhandler, iconclass, defaultbuttonflag)

Data Statistics description:

Text: The text that alert will show
Title: The title of the publish window.
Flags: click the button to be displayed in the pop-up window. Currently, there is alert. OK,
Alert. Cancel, alert. Yes,
Alert. No. The default value is alert. OK.
Parent: the object that calls alert, usually this
Closehandle: Specifies the eventhandler name. You do not need to add ""
Iconclass: zookeeper to be presented by alert
Defaultbuttonflag: It can be alert. OK,
Alert. Cancel, alert. Yes,
Alert. No. The default value is alert. OK. The main purpose is to press enter to which button will be pressed after the weak window appears.

Example:

Alert. Show ("do you want to save your changes ?", "Save changes ",
Alert. OK | alert. Cancel | alert. Yes, this, alertclickhandler );

<xml version="1.0"?>
<!-- controls\alert\AlertEvent.mxml
-->
<xmlns:fx="http://ns.adobe.com/mxml/2009"
   
xmlns:s="library://ns.adobe.com/flex/spark"
   
xmlns:mx="library://ns.adobe.com/flex/mx">
   
<fx:Script>
       
CDATA[
            import
mx.controls.Alert;
            import mx.events.CloseEvent;

            private function alertListener(eventObj:CloseEvent):void
{
                // Check to see if the OK button was
pressed.
                if (eventObj.detail==Alert.OK)
{
                    myText.text = myInput.text;
               
}
            }
        ]]>
    </fx:Script>
   
   
<s:VGroup>
       < TextInput id="myInput" width="150"  text=""
/>
        <s:Button id="myButton"  label="Copy
Text"
click='Alert.show("Copy Text?", "Alert",  Alert.OK | Alert.CANCEL,
this, alertListener, null, Alert.OK);'/>
        <TextInput
id="myText"/>
    </s:VGroup>
</s:Application>

Site: http://livedocs.adobe.com/flex/3/langref/mx/controls/Alert.html#show ()

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.