In a previous example, “Setting the width and height of a WindowedApplication container in Adobe AIR”, we saw how to set the initial width and height of an Adobe AIR WindowedApplication container by setting the width and height properties.

The following example shows how you can set the width and height of a WindowedApplication container by setting the <width> and <height> nodes in the application’s XML file.

Full code after the jump.

<?xml version="1.0" encoding="utf-8"?>
<!--  -->
<mx:WindowedApplication name="WindowedApplication_width_test2"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical">
 
    <mx:Label text="{this.width}x{this.height}" /> 
 
</mx:WindowedApplication>

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

<!-- The window's initial width. Optional. -->
<width>800</width>
 
<!-- The window's initial height. Optional. -->
<height>600</height>
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