Class: BorderLayoutOptions

BorderLayoutOptions

PUXI.BorderLayoutOptions defines a simple layout with five regions - the center and four regions along each border. The top and bottom regions span the full width of the parent widget-group. The left and right regions span the height of the layout minus the top and bottom region heights.

------------------------------------------------
|                 TOP REGION                   |
------------------------------------------------
|        |                            |        |
|  LEFT  |          CENTER            | RIGHT  |
| REGION |          REGION            | REGION |
|        |                            |        |
------------------------------------------------
|                BOTTOM REGION                 |
------------------------------------------------

The height of the layout is measured as the sum of the heights of the top, center, and bottom regions. Similarly, the width of the layout is measured as the width of the left, center, and right regions.

As of now, border layout doesn't support percent widths and heights.

new BorderLayoutOptions ()

Extends

Members

PUXI.BorderLayoutOptions.REGION_BOTTOM number static

Positions a widget below the top border of the layout.

PUXI.BorderLayoutOptions.REGION_CENTER number static

Positions a widget in the center of the layout. The main content of the layout should be in the center.

PUXI.BorderLayoutOptions.REGION_LEFT number static

Positions a widget inside the left border of the layout.

PUXI.BorderLayoutOptions.REGION_RIGHT number static

Positions a widget below the right border of the layout.

PUXI.BorderLayoutOptions.REGION_TOP number static

Positions a widget below the top border of the layout.

height number inherited overrides

Preferred height of the widget in pixels. If its value is between -1 and 1, it is interpreted as a percentage of the parent's height.

Default Value:
  • {PUXI.LayoutOptions.WRAP_CONTENT}

horizontalAlign PUXI.ALIGN

Alignment of the widget horizontally in its region.

Default Value:
  • {PUXI.ALIGN.LEFT}

marginBottom number inherited overrides

The bottom margin in pixels of the widget.

Default Value:
  • 0

marginLeft number inherited overrides

The left margin in pixels of the widget.

Default Value:
  • 0

marginRight number inherited overrides

The right margin in pixels of the widget.

Default Value:
  • 0

marginTop number inherited overrides

This top margin in pixels of the widget.

Default Value:
  • 0

region number

The border along which the widget is to be placed. This can be one of POS_LEFT, POS_TOP, POS_RIGHT, POS_BOTTOM.

Default Value:
  • {PUXI.BorderLayoutOptions#REGION_CENTER}

verticalAlign PUXI.ALIGN

Alignment of the widget vertically in its region.

Default Value:
  • {PUXI.ALIGN.TOP}

width number inherited overrides

Preferred width of the widget in pixels. If its value is between -1 and 1, it is interpreted as a percentage of the parent's width.

Default Value:
  • {PUXI.LayoutOptions.WRAP_CONTENT}