Skip to content

Controlling whether your application is resizable in Adobe AIR

by on December 18th, 2008

The following example shows how you can control whether an Adobe AIR application is resizable by setting the resizable node value to true or false (default is true). You can determine whether an application is resizable by using the read-only resizable property on the WindowedApplication object.

Full code after the jump.

<?xml version="1.0" encoding="utf-8"?>
<!-- http://airexamples.com/2008/12/18/controlling-whether-your-application-is-resizable-in-adobe-air/ -->
<mx:WindowedApplication name="WindowedApplication_resizable_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">
 
    <mx:Label id="lbl"
            text="resizable = {application.resizable}"
            fontSize="32" />
 
</mx:WindowedApplication>

To set whether the application is resizable, uncomment out the following lines from the AIR application’s descriptor XML file, and set the value to false:

<!-- Whether the user can resize the window. Optional. Default true. -->
<resizable>false</resizable>
No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS

Spam Protection by WP-SpamFree