Skip to main content
Participant
June 26, 2014
Question

Is it possible to make an air application maximizable/non-maximizable programmatically at runtime?

  • June 26, 2014
  • 1 reply
  • 687 views

Is it possible to make an air application maximizable/non-maximizable programmatically at runtime?

This topic has been closed for replies.

1 reply

Inspiring
June 26, 2014

Sort of. Technically it's a NativeWindow which is maximizable or not, not the app itself. A NativeWindow is created as maximizable or not via NativeWindowInitOptions, and it can't be changed after it's created. Now, when you setup the "default content" window options with AIR, the runtime is basically creating the first window for you as a convenience, with those settings. However, there's nothing stopping you from making your initial content nothing more than a hidden window which will create a new window as maximizable or not. At this point, it would not be hard to re-create your main window with different maximizable values. (This is also how I implement multiple-instance/window apps, since only 1 AIR app can be running at a time.)

Hope that helps!

-Aaron

Participant
June 27, 2014

Thank you Aaron! That will help.