WrapLayout

This is an overview of the most common usage of WrapLayout. For more information about the available properties, methods, or events, head over to the complete API documentation for WrapLayout.

O container WrapLayout posiciona os filhos em linhas ou colunas, baseado na propriedade orientation até o espaço ser preenchido, e então e ele os coloca em uma nova linha ou coluna.

Exemplos

WrapLayout padrão

<WrapLayout backgroundColor="#3c495e">
  <Label text="first" width="30%" height="30%" backgroundColor="#43b883"/>
  <Label text="second" width="30%" height="30%" backgroundColor="#1c6b48"/>
  <Label text="third" width="30%" height="30%" backgroundColor="#289062"/>
  <Label text="fourth" width="30%" height="30%" backgroundColor="#289062"/>
</WrapLayout>

WrapLayout Vertical

<WrapLayout orientation="vertical" backgroundColor="#3c495e">
  <Label text="first" width="30%" height="30%" backgroundColor="#43b883"/>
  <Label text="second" width="30%" height="30%" backgroundColor="#1c6b48"/>
  <Label text="third" width="30%" height="30%" backgroundColor="#289062"/>
  <Label text="fourth" width="30%" height="30%" backgroundColor="#289062"/>
</WrapLayout>

Propriedades

nometipodescrição
orientationStringValor indicando a direção do fluxo. Se o valor de orientation é horizontal, os itens são organizados em linhas. Se o valor de orientation é vertical, os itens são organizados em colunas. O valor padrão é horizontal.
itemWidthNumberA largura usada para medir e desenhar cada filho. Valor padrão é Number.NaN, que não restrige aos filhos.
itemHeightNumberA altura usado para medir e desenhar cada filho. Valor padrão é Number.NaN, que não restrige aos filhos.

Propriedades filhas adicionais

Não existem propriedades adicionais para elementos filhos.

Contributors