# enaml.core.conditional

Classes

`Conditional` | A pattern object that represents conditional objects.

class enaml.core.conditional.Conditional(parent=None, **kwargs)

  Bases: `Pattern`

  A pattern object that represents conditional objects.

  When the condition attribute is True, the conditional will create its child items and insert them into its parent; when False, the old items will be destroyed.

  condition

    The condition variable. If this is True, a copy of the children will be inserted into the parent. Otherwise, the old copies will be destroyed.

  items

    The list of items created by the conditional. This list should not be manipulated directly by user code.

  destroy()

    A reimplemented destructor.

    The conditional will release the owned items on destruction.

  pattern_items()

    Get a list of items created by the pattern.

  refresh_items()

    Refresh the items of the pattern.

    This method destroys the old items and creates and initializes the new items.