The following example shows how you can customize the text styles on the WindowedApplication status bar in Adobe AIR by setting the statusTextStyleName style.

<?xml version="1.0" encoding="utf-8"?>
<!-- http://airexamples.com/2010/03/13/setting-a-custom-text-style-on-the-status-bar-on-a-windowedapplication-container-in-adobe-air/ -->
<mx:WindowedApplication name="WindowedApplication_statusTextStyleName_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        status="WindowedApplication status"
        statusTextStyleName="boldRed">
 
    <mx:Style>
        @font-face {
            src: url("C:/Windows/Fonts/ARIALBD.TTF");
            fontFamily: "ArialEmbedded";
            fontWeight: "bold";
        }
 
        .boldRed {
            color: red;
            fontFamily: "ArialEmbedded";
            fontSize: 10;
            fontWeight: bold;
        }
    </mx:Style>
 
</mx:WindowedApplication>

You can also set the statusTextStyleName style in an external .CSS file or <Script> block, as seen in the following example:

<?xml version="1.0" encoding="utf-8"?>
<!-- http://airexamples.com/2010/03/13/setting-a-custom-text-style-on-the-status-bar-on-a-windowedapplication-container-in-adobe-air/ -->
<mx:WindowedApplication name="WindowedApplication_statusTextStyleName_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        status="WindowedApplication status">
 
    <mx:Style>
        @font-face {
            src: url("C:/Windows/Fonts/ARIALBD.TTF");
            fontFamily: "ArialEmbedded";
            fontWeight: "bold";
        }
 
        .boldRed {
            color: red;
            fontFamily: "ArialEmbedded";
            fontSize: 10;
            fontWeight: bold;
        }
 
        WindowedApplication {
            statusTextStyleName: boldRed;
        }
    </mx:Style>
 
</mx:WindowedApplication>
Tagged with:
 

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Spam Protection by WP-SpamFree