enable.stacked_container module

Containers which lay out their components horizontally or vertically

class enable.stacked_container.HStackedContainer(*components, **traits)[source]

Bases: enable.stacked_container.StackedContainer

A container that stacks components horizontally.

stack_index = 0
class enable.stacked_container.StackedContainer(*components, **traits)[source]

Bases: enable.container.Container

Base class for stacked containers

get_preferred_size(components=None)[source]

Returns the size (width,height) that is preferred for this component.

When called on a component that does not contain other components, this method just returns the component bounds. If the component is resizable and can draw into any size, the method returns a size that is visually appropriate. (The component’s actual bounds are determined by its container’s do_layout() method.)

stack_index = 0
class enable.stacked_container.VStackedContainer(*components, **traits)[source]

Bases: enable.stacked_container.StackedContainer

A container that stacks components vertically.

stack_index = 1