Controlling whether your application is resizable in Adobe AIR

by Peter deHaan on December 18, 2008 · 0 comments

in WindowedApplication

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>

{ 0 comments… add one now }

Leave a Comment

You can 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="">

Previous post:

Next post: