Grid

../_images/grid-preview.png

Widget description

A grid layout widget.

The grid is a grid layout widget that lays out a series of children as a fixed “grid” of widgets using a given percentage of the grid width and height each using the child object.

The Grid uses a “Virtual resolution” that is stretched to fill the grid widgets size itself. The default is 100 x 100, so that means the position and sizes of children will effectively be percentages (0 to 100) of the width or height of the grid widget.

Inheritance diagram

class efl.elementary.Grid(Object parent, *args, **kwargs)

Bases: efl.elementary.__init__.Object

Parameters:
  • parent (efl.evas.Object) – The parent object
  • **kwargs – All the remaining keyword arguments are interpreted as properties of the instance
children

Get the list of the children for the grid.

Type:tuple of Object
children_get
clear

Faster way to remove all child objects from a grid object.

Parameters:clear (bool) – If True, will also delete the just removed children
pack

Pack child at given position and size

Parameters:
  • subobj (Object) – The child to pack
  • x (Evas_Coord (int)) – The virtual x coord at which to pack it
  • y (Evas_Coord (int)) – The virtual y coord at which to pack it
  • w (Evas_Coord (int)) – The virtual width at which to pack it
  • h (Evas_Coord (int)) – The virtual height at which to pack it
size

The virtual size (width and height) of the grid.

Type:tuple of Evas_Coords (int)
size_get
size_set
unpack

Unpack a child from a grid object

Parameters:subobj (Object) – The child to unpack
efl.elementary.grid_pack_set(subobj, x, y, w, h)

Set packing of an existing child at to position and size

Parameters:
  • subobj (Object) – The child to set packing of
  • x (Evas_Coord (int)) – The virtual x coord at which to pack it
  • y (Evas_Coord (int)) – The virtual y coord at which to pack it
  • w (Evas_Coord (int)) – The virtual width at which to pack it
  • h (Evas_Coord (int)) – The virtual height at which to pack it
efl.elementary.grid_pack_get(subobj)

Get packing of a child

Parameters:subobj (Object) – The child to query

return: The position and size rtype: tuple of Evas_Coords (int)