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”?><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"?>
<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>

Alex Smirnov

Senior Java Developer. JAVA, PHP, Cold Fusion, SQL, Air, Flash.

More Posts