Skip to content

Hosting controls

Marc Hermans edited this page Jan 22, 2019 · 2 revisions

Common properties of all hosting controls

Description

As described in simple controls, the control types are split into two categories, simple and hosting. This page will describe the hosting controls.

The criteria that determines if a control is hosting or not, is: Can this control contain other controls and act as parent for other controls. In other words: Can it host child controls? ##Properties Hosting controls inherit their properties from simple controls. So go read all of their properties first before continuing.

Required

Property Descriptor Description Examples
Children children The children of the control Other controls.

Details

Children (Required)

This determines which controls are inside this control. It does not really make sense to leave this list empty, but this is up to the creator of the UI to determine.

Certain languages might support a in-language way of defining the children of a control.

Optional

Property Descriptor Description Examples
Padding padding The distance from this controls borders that controls need to be "4,2", "1,2,3,4"

Details

Padding (0,0,0,0)

Defines the distance a child control is minimally even when its margin property is set to 0,0,0,0.

Definition

JSON

{
  "type": "blockout:dummy_with_children_type",
  "id": "dummy_with_children",
  "size": "90,12",
  "padding": "4",
  "children": [
    {
      "type": "blockout:dummy",
      "id": "dummy",
      "size": "15,12",
      "alignment": "RIGHT,BOTTOM"
    }
  ]
}