Skip to content

T160. (1.6.0 and later) Layouts

Dmitry Mamontov edited this page Jun 17, 2016 · 1 revision

Layouts

What is layouts?

Layouts is a mechanism in Saddy 1.6.0, that allows to orghanize objects in rectangular grids. It allows to apply a basic table cell alignment for each of grid's cell. Also, it supports similar to HTML tables rowspan and colspan properties and nesting.

Properties of layout cell

  • width - a desired width of cell (may be automatic, set in pixels, set in percents to grid width. Default: auto)
  • height - a desired height of cell (may be automatic, set in pixels, set in percents to grid height. Default: auto)
  • verticalAlignment - a vertical align for a cell (top, middle, bottom)
  • horizontalAlignment - a horizontal align for a cell (left, middle, right)
  • stackingType - how objects are stacked in cell, horizontally or vertically
  • paddingTop - a top padding
  • paddingBottom - a bottom padding
  • paddingLeft - a left padding
  • paddingRight - a right padding
  • a list of child objects (those could be a common objects or layouts)

Properties of grid layout

  • area - a rectangle, which contains a grid
  • rows, columns - amount of rows and columns
  • paddingTop - a top padding
  • paddingBottom - a bottom padding
  • paddingLeft - a left padding
  • paddingRight - a right padding
  • fixedWidth - whether it has fixed width
  • fixedHeight - whether is has fixed height
  • a list of cells