Table¶
Widget description¶
A container widget to arrange other widgets in a table where items can span multiple columns or rows - even overlap (and then be raised or lowered accordingly to adjust stacking if they do overlap).
The row and column count is not fixed. The table widget adjusts itself when subobjects are added to it dynamically.
The most common way to use a table is:
table = Table(win)
table.show()
table.padding = (space_between_columns, space_between_rows)
table.pack(table_content_object, x_coord, y_coord, colspan, rowspan)
table.pack(table_content_object, x_coord, y_coord, colspan, rowspan)
table.pack(table_content_object, x_coord, y_coord, colspan, rowspan)
Inheritance diagram¶
- class efl.elementary.Table(Object parent, *args, **kwargs)¶
Bases:
efl.elementary.__init__.Object
This is the class that actually implement the widget.
- Parameters
parent (
efl.evas.Object
) – The parent object**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
- align¶
The alignment of the table
Default value is (0.5, 0.5)
- Type
(float horizontal, float vertical)
New in version 1.13.
- align_get()¶
- align_set(horizontal, vertical)¶
- child_get(col, row)¶
Get child object of table at given coordinates.
- Parameters
col (int) – Column number of child object
row (int) – Row number of child object
- Returns
Child of object if find if not return None.
New in version 1.8.
- clear(clear)¶
Faster way to remove all child objects from a table object.
- Parameters
clear (bool) – If True, will delete children, else just remove from table.
- homogeneous¶
The homogeneous layout in the table
- Type
bool
- homogeneous_get()¶
- homogeneous_set(homogeneous)¶
- pack(subobj, x, y, w, h)¶
Add a subobject on the table with the coordinates passed
Note
All positioning inside the table is relative to rows and columns, so a value of 0 for x and y, means the top left cell of the table, and a value of 1 for w and h means
subobj
only takes that 1 cell.- Parameters
subobj (
Object
) – The subobject to be added to the tablex (int) – Row number
y (int) – Column number
w (int) – colspan
h (int) – rowspan
- padding¶
Padding between cells.
Default value is (0, 0).
- Type
(int, int)
- padding_get()¶
- padding_set(horizontal, vertical)¶
- efl.elementary.table_pack_set(subobj, x, y, w, h)¶
Set the packing location of an existing child of the table
Modifies the position of an object already in the table.
Note
All positioning inside the table is relative to rows and columns, so a value of 0 for x and y, means the top left cell of the table, and a value of 1 for w and h means
subobj
only takes that 1 cell.- Parameters
subobj (
Object
) – The subobject to be modified in the tablex (int) – Row number
y (int) – Column number
w (int) – rowspan
h (int) – colspan