Skip to content
Feb 26 /

Setting the header height on a WindowedApplication container in Adobe AIR

The following example shows how you can set the header height on an Adobe AIR WindowedApplication container by setting the headerHeight style.

Full code after the jump.

<?xml version="1.0" encoding="utf-8"?>
<!-- http://airexamples.com/2009/02/26/setting-the-header-height-on-a-windowedapplication-container-in-adobe-air/ -->
<mx:WindowedApplication name="WindowedApplication_headerHeight_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        title="WindowedApplication headerHeight"
        headerHeight="{slider.value}">
 
    <mx:ApplicationControlBar dock="true">
        <mx:Form>
            <mx:FormItem label="headerHeight:">
                <mx:HSlider id="slider"
                        minimum="30"
                        maximum="60"
                        value="30"
                        snapInterval="1"
                        tickInterval="2"
                        liveDragging="true" />
            </mx:FormItem>
        </mx:Form>
    </mx:ApplicationControlBar>
 
</mx:WindowedApplication>

Next, edit the application’s XML file and edit the following lines:

<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
<systemChrome>none</systemChrome>
 
<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
<transparent>true</transparent>

Leave a Comment

Spam Protection by WP-SpamFree