8.6 Released with 🥽 visionOS support and more!
Check it out
Defines a rectangular layout area that consists of columns and rows.

Summary ​

Constructors

constructor

Methods

addChildAtCell
addColumn
addRow
getColumn
getColumns
getColumnSpan
getRow
getRows
getRowSpan
removeColumn
removeColumns
removeRow
removeRows
setColumn
setColumnSpan
setRow
setRowSpan
122 methods inherited from LayoutBase
Click to expand

Constructors ​

constructor ​

new GridLayout(): GridLayout

Methods ​

addChildAtCell ​

addChildAtCell(view: View, row: number, column: number, rowSpan?: number, columnSpan?: number): void
Adds a child at specific cell in GridLayout. Optional rowSpan and columnSpan attributes
Parameter Default Description
view

row
number

column
number

rowSpan
number

columnSpan
number

Returns void

addColumn ​

addColumn(itemSpec: ItemSpec): void
Adds a column specification to a GridLayout.
Parameter Default Description
itemSpec

Returns void

addRow ​

addRow(itemSpec: ItemSpec): void
Adds a row specification to a GridLayout.
Parameter Default Description
itemSpec

Returns void

getColumns ​

getColumns(): ItemSpec[]
Gets array of column specifications defined on this instance of GridLayout.
Returns ItemSpec[]

getRows ​

getRows(): ItemSpec[]
Gets array of row specifications defined on this instance of GridLayout.
Returns ItemSpec[]

removeColumn ​

removeColumn(itemSpec: ItemSpec): void
Removes a column specification from a GridLayout.
Parameter Default Description
itemSpec

Returns void

removeColumns ​

removeColumns(): void
Removes all column specifications from a GridLayout.
Returns void

removeRow ​

removeRow(itemSpec: ItemSpec): void
Removes a row specification from a GridLayout.
Parameter Default Description
itemSpec

Returns void

removeRows ​

removeRows(): void
Removes all row specifications from a GridLayout.
Returns void

getColumn ​

Static
getColumn(view: View): number
Gets the value of the Column attached property from a given View.
Parameter Default Description
view

Returns number

getColumnSpan ​

Static
getColumnSpan(view: View): number
Gets the value of the ColumnSpan attached property from a given View.
Parameter Default Description
view

Returns number

getRow ​

Static
getRow(view: View): number
Gets the value of the Row attached property from a given View.
Parameter Default Description
view

Returns number

getRowSpan ​

Static
getRowSpan(view: View): number
Gets the value of the RowSpan attached property from a given View.
Parameter Default Description
view

Returns number

setColumn ​

Static
setColumn(view: View, value: number): void
Sets the value of the Column attached property to a given View.
Parameter Default Description
view

value
number

Returns void

setColumnSpan ​

Static
setColumnSpan(view: View, value: number): void
Sets the value of the ColumnSpan attached property to a given View.
Parameter Default Description
view

value
number

Returns void

setRow ​

Static
setRow(view: View, value: number): void
Sets the value of the Row attached property to a given View.
Parameter Default Description
view

value
number

Returns void

setRowSpan ​

Static
setRowSpan(view: View, value: number): void
Sets the value of the RowSpan attached property to a given View.
Parameter Default Description
view

value
number

Returns void