If you really need this you could access the internal textField and 
use the htmlText property using mx_internal. Of course, this could 
not work with future versions of the Flex SDK.

Example:


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute">
   <mx:Script>
        <![CDATA[
            import mx.controls.Alert;

            private var messageAlert:Alert;


            private function showAlert():void {
                Alert.yesLabel = "OK";
                Alert.noLabel = "Cancel";

                messageAlert = Alert.show(
                        "This option is NOT allowed",
                       "Title",
                        Alert.NO | Alert.YES
                    );
                /* Access the internal HtmlText. */
                
messageAlert.mx_internal::alertForm.mx_internal::textField.htmlText="T
his option is <b>NOT</b> allowed";
            }
        ]]>
    </mx:Script>

    <mx:Style>

        Alert {
            messageStyleName: "alertMessageStyle";
        }

         .alertMessageStyle {
            color: black;
        }

    </mx:Style>

    <mx:Button label="Show Alert" click="showAlert()" />
        
</mx:Application>


--- In [email protected], "Peter DeHaan" <[EMAIL PROTECTED]> wrote:
>
> Kevin,
> 
>  
> 
> You can file an enhancement request (ECR) in the public Flex bug 
base at
> http://bugs.adobe.com/flex/.
> 
> File against the "Flex SDK", and then select "Component: Alert".
> 
>  
> 
> Thanks,
> 
> Peter
> 
>  
> 
>  
> 
> ________________________________
> 
> From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Kevin
> Sent: Saturday, November 10, 2007 8:24 AM
> To: [email protected]
> Subject: [flexcoders] Alert accept html formatting?
> 
>  
> 
> Is there a simple way to format the text in an alert popup? (I know 
I 
> can always create my own custom PopUps...)
> 
> Specifically, it would be nice to bold some words. It might be nice 
> if the Alert had a htmlText property...
> 
> - Kevin
>


Reply via email to