The following example shows how you can set a custom text format on a Adobe AIR WindowedApplication container’s title bar by setting the titleTextStyleName style.

Full code after the jump.

Download WindowedApplication_titleTextStyleName_test




 
    
        @font-face {
            src: url("assets/ARIALBD.TTF");
            fontFamily: "ArialEmbedded";
            fontWeight: "bold";
        }
 
        .boldRed {
            color: red;
            fontFamily: "ArialEmbedded";
            fontSize: 24;
            fontWeight: bold;
        }
    
 

In order to see the title icon and custom font, you also need to edit your AIR application’s XML file and change the following values:


none


true

windowedapplication_titletextstylename_test

2 Responses to Setting a custom text format on a WindowedApplication container’s title bar in Adobe AIR

  1. Greg L says:

    I sure can’t duplicate this example (or any other I’ve tried). Do you know if something has changed with AIR 1.5 that breaks this? I created a brand new AIR app in Flex builder (plugin) 3.2, cut/pasted your code, made the two changes to the -app.xml, published it. The only thing I’ve done differently (that I can think of) is to use a different .png file since I didn’t have access to yours.

  2. Bruce says:

    Something has changed – this demo does not display any text in the title although the icon makes an appearance. It’s the simple things that you can’t do in Flex that are the most frustrating and you are right Greg there is no help when you Google it and in any book, cook-book, guide, bible that I’ve come across either. It also looks that Peter has finished writing any Air hints and tips which is a great pity because Air in Flex 4 is so different.

Leave a Reply

Your email address will not be published.