Skip to main content

Setting the Display Range

It is possible to change the size of application display area. Here we are going to explain how to change the display width and the display height respectively.

Changing Display Height​

To change the height of display area, we provide API that can automatically adjust display height to wrap its content.

Preparation​

In order to use that API, please enable the following Feature in Gadget XML.

<Module ...>
<ModulePrefs>
<Require feature="dynamic-height" />
...
</ModulePrefs>
...

Auto-adjust Display Height​

Use the following code to auto-adjust display height to wrap its content.

gadgets.window.adjustHeight();
When the adjustHeight() function is executed, the display height is automatically adjusted.

Changing Display Width​

To change the width of display area, please update Gadget XML as follows.

<Module ...>
<ModulePrefs>
<Require feature="dynamic-height" />
...
</ModulePrefs>
<Content type="html" view="canvas" preferred_width="800">
...

However, the page layout changes depending on the width specified above, whether it is less than or equal to 760 pixels or above that. The recommended display width is 950 pixels. Please refer to the following example for how they look respectively.

For width less than or equal to 760 pixels, the page layout looks like this.

For width more than or equal to 760 pixels, the page layout looks like this.

Revision History​

  • 03/2015
    • Added explanation to change both width and height.
    • Added sample pictures
  • 12/2010
    • Initial Release.