window Action

An action for basic controls over the window where available.

{
  "window": {
    "resize": {
      "width": 800,
      "height": 600
    }
  }

Properties

resize
OBJECT

Resize the window based on the desired content size. This will ignore toolbar sizing.

width
INTEGER | "auto"

When integer, sets the content width. When "auto" the width will be calculated from the content. When null (or absent), the current width is kept.

height
INTEGER | "auto"

When integer, sets the content height. When "auto" the height will be calculated from the content. When null (or absent), the current height is kept.

Examples

Resize window

{
  "type": "button",
  "text": "Resize window to 800×600",
  "events": [
    {
      "triggers": "actioned",
      "action": {
        "type": "json",
        "src": {
          "window": {
            "resize": {
              "width": 800,
              "height": 600
            }
          }
        }
      }
    }
  ]
}