Desktop Packager Sencha Docs

Ion.ui

Provides access to user interface information and classes including Window and Menu.

Defined By

Properties

Ion.ui
: Objectreadonly
Query the dimentions of the user's main screen. ...

Query the dimentions of the user's main screen.

Returns an object with the following structure:

  • width : Number
  • height : Number
// Let the user know how big his desktop is.
var size = Ion.ui.desktopSize;
alert('Your desktop is ' + size.width + 'px wide and ' + size.height + 'px tall!');
Ion.ui
: Ion.ui.Windowreadonly
A static reference to the application's main window. ...

A static reference to the application's main window. Every application has an initial window that is automatically instantiated. When all windows of an application are closed, the application will exit.

var win = Ion.ui.mainWindow;

// Size the window to be exactly 1024x768, and then center it on the screen.
win.setDimensions(1024, 768);
win.center();