glydget

Container

class Container(children=[])

Bases: glydget.widget.Widget

The Container class is an abstract class providing common attributes and methods for a number of widget subclasses that manage the layout of other widgets within the area of a window.

Known sub-classes:

Methods

Container.insert(child[, index]) Insert a new child into the container.
Container.append(child) Append a child to the container.
Container.prepend(child) Prepend a child to the container.
Container.remove(child) Remove a child from container.

Properties

Container.children Container’s children.

Methods Details

Container.insert(child, index=0)

Insert a new child into the container.

Inserting a child into a container usually results in the resizing and redrawing of the container contents.

Parameters:
index : int
index of place where to insert child
child : glydget.Widget
child to be added
Container.append(child)

Append a child to the container.

Appending a child to a container usually results in the resizing and redrawing of the container contents.

Parameters:
child : glydget.Widget
child to be added
Container.prepend(child)

Prepend a child to the container.

Prepending a child to a container usually results in the resizing and redrawing of the container contents.

Parameters:
child : glydget.Widget
child to be added
Container.remove(child)

Remove a child from container.

Removing a child to a container usually results in the resizing and redrawing of the container contents.

Parameters:
child : glydget.Widget
child to be removed (must be currently in container).

Properties Details

Container.children

Container’s children.

Type:[glydget.widget.Widget,...], read-only.