A RowLayout
is a layout that represents a single column of elements (a set
of multple rows). Each row has the same size and can contain one element
only. If another element is added to the same row, the row's current element
is removed from the layout.
Constructor
new(posX:Int, posY:Int, width:Int, height:Int, amountRows:Int)
Creates a new row layout.
Parameters:
posX | The x position of the layout |
---|---|
posY | The y position of the layout |
width | The width of the layout |
height | The height of the layout |
amountRows | The amount of rows |
Methods
addToRow(element:Element, row:Int, ?anchor:Anchor):Void
Adds an element to this RowLayout
at the given position. Please note
that if an element already exists at that position, it is removed from
the layout.
If the given position does not exist, an error is raised and the element is not added to this layout.
Parameters:
element | The given element |
---|---|
row | The row this element should be placed in |
anchor | (Optional) The anchor of the element. If not given, use the elements default anchor. Otherwise, the element's anchor setting is overwritten. |
removeAtRow(row:Int):Void
Removes the element at the given row from this layout.
Parameters:
row | The row of the element |
---|