# enaml.layout.layout_helpers

. rubric:: Functions

`horizontal` | Create a left-to-right SequenceHelper object.
`vertical` | Create a top-to-bottom SequenceHelper object.
`hbox` | Create a horizontal LinearBoxHelper object.
`vbox` | Create a vertical LinearBoxHelper object.
`align` | Create a SequenceHelper with the given anchor object.
`factory` | Create a FactoryHelper with the given factory function.
`grid` | Create a GridHelper object with the given rows.
`expand_constraints` | A function which expands any ConstraintHelper in the list.

enaml.layout.layout_helpers.horizontal(*items, **config)

  Create a left-to-right SequenceHelper object.

  Parameters:

    - items – The constraint items to pass to the helper.

    - config – Additional keyword arguments to pass to the helper.

enaml.layout.layout_helpers.vertical(*items, **config)

  Create a top-to-bottom SequenceHelper object.

  Parameters:

    - items – The constraint items to pass to the helper.

    - config – Additional keyword arguments to pass to the helper.

enaml.layout.layout_helpers.hbox(*items, **config)

  Create a horizontal LinearBoxHelper object.

  Parameters:

    - items – The constraint items to pass to the helper.

    - config – Additional keyword arguments to pass to the helper.

enaml.layout.layout_helpers.vbox(*items, **config)

  Create a vertical LinearBoxHelper object.

  Parameters:

    - items – The constraint items to pass to the helper.

    - config – Additional keyword arguments to pass to the helper.

enaml.layout.layout_helpers.align(anchor, *items, **config)

  Create a SequenceHelper with the given anchor object.

  Parameters:

    - anchor (str) – The name of the target anchor on the constrainable object.

    - items – The constraint items to pass to the helper.

    - config – Additional keyword arguments to pass to the helper.

enaml.layout.layout_helpers.factory(func, *args, **kwargs)

  Create a FactoryHelper with the given factory function.

  Parameters:

    - func (callable) – The callable which will generate the list of constraints. The owner widget will be passed as the first argument.

    - args – Additional positional arguments to pass to the factory.

    - kwargs – Additional keyword arguments to pass to the factory.

enaml.layout.layout_helpers.grid(*rows, **config)

  Create a GridHelper object with the given rows.

  Parameters:

    - rows – Rows of identifier to use to build a grid.

    - config – Additional keyword arguments to pass to the helper.

enaml.layout.layout_helpers.expand_constraints(component, constraints)

  A function which expands any ConstraintHelper in the list.

  Parameters:

    - component (Constrainable) – The constrainable component with which the constraints are associated. This will be passed to the .create_constraints() method of any ConstraintHelper instance.

    - constraints (list) – The list of constraints to expand.

  Returns:

    result – The list of expanded constraints.

  Return type:

    list