enaml.layout.layout_helpers
. rubric:: Functions
Create a left-to-right SequenceHelper object. |
|
Create a top-to-bottom SequenceHelper object. |
|
Create a horizontal LinearBoxHelper object. |
|
Create a vertical LinearBoxHelper object. |
|
Create a SequenceHelper with the given anchor object. |
|
Create a FactoryHelper with the given factory function. |
|
Create a GridHelper object with the given rows. |
|
A function which expands any ConstraintHelper in the list. |
- enaml.layout.layout_helpers.horizontal(*items, **config)[source]
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)[source]
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)[source]
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)[source]
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)[source]
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)[source]
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)[source]
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)[source]
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: