Setting a maximum width and height on a WindowedApplication container in Adobe AIR
The following example shows how you can set a maximum width and height on a Adobe AIR application by setting the maxWidth and maxHeight properties on the WindowedApplication tag.
Full code after the jump.
<?xml version="1.0" encoding="utf-8"?> <!-- http://airexamples.com/2009/01/19/setting-a-maximum-width-and-height-on-a-windowedapplication-container-in-adobe-air/ --> <mx:WindowedApplication name="WindowedApplication_maxWidth_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white" maxWidth="800" maxHeight="600" width="550" height="400"> <mx:Form> <mx:FormItem label="width:"> <mx:Label text="{this.width}" /> </mx:FormItem> <mx:FormItem label="height:"> <mx:Label text="{this.height}" /> </mx:FormItem> </mx:Form> </mx:WindowedApplication>
One Comment
→
Are you kidding me? A post for setting a maxwidth property on a tag? Shouldn’t you have a post about regular width, id, etc. I’m being ironic if you’re not getting it…
Would like to see a little more advanced examples, I prefer code…