PDA

View Full Version : Grid vs GridLayout



sajis997
20th January 2015, 11:26
Hello Forum,

Can any one describe the differences between Grid and GridLayout ? The documentation along with small code snippets was not clear enough to me .

When to use which one ?

Thanks

anda_skoa
20th January 2015, 11:47
Grid is a Positioner, it will arrange its children according to its filling scheme/direction.

GridLayout does also arrange its children but you can position elements where you want, make them span columns and/or rows.

The Grid is usually used as a composition, it is a new element that is made of smaller elements, i.e. its size is determined by the children and it has to be positioned into the parent.

The GridLayout is usually used to fill a parent item with sub items, i.e. its size is determined by the parent and it fits the children into that space.

But there are a lot of cases where one can use either.

Cheers,
_