# enaml.widgets.dock_item

Classes

`DockItem` | A widget which can be docked in a DockArea.

class enaml.widgets.dock_item.DockItem(parent=None, **kwargs)

  Bases: `Widget`

  A widget which can be docked in a DockArea.

  A DockItem is a widget which can be docked inside of a DockArea. It can have at most a single Container child widget.

  title

    The title to use in the title bar.

  title_editable

    Whether or the not the title is user editable.

  title_bar_visible

    Whether or not the title bar is visible.

  icon

    The icon to use in the title bar.

  icon_size

    The size to use for the icon in the title bar.

  stretch

    The stretch factor for the item when docked in a splitter.

  closable

    Whether or not the dock item is closable via a close button.

  title_bar_right_clicked

    An event emitted when the title bar is right clicked.

  closing

    An event fired when the user request the dock item to be closed. This will happen when the user clicks on the “X” button in the title bar button, or when the ‘close’ method is called. The payload will be a CloseEvent object which will allow code to veto the close event and prevent the item from closing.

  closed

    An event emitted when the dock item is closed. The item will be destroyed after this event has completed.

  proxy

    A reference to the ProxyDockItem object.

  dock_widget()

    Get the dock widget defined for the dock pane.

    The last child Container is considered the dock widget.

  alert(level, on=250, off=250, repeat=4, persist=False)

    Set the alert level on the dock item.

    This will override any currently applied alert level.

    Parameters:

      - level (unicode) – The alert level token to apply to the dock item.

      - on (int) – The duration of the ‘on’ cycle, in ms. A value of -1 means always on.

      - off (int) – The duration of the ‘off’ cycle, in ms. If ‘on’ is -1, this value is ignored.

      - repeat (int) – The number of times to repeat the on-off cycle. If ‘on’ is -1, this value is ignored.

      - persist (bool) – Whether to leave the alert in the ‘on’ state when the cycles finish. If ‘on’ is -1, this value is ignored.

  activated

    An event fired when an object’s proxy is activated. It is triggered once during the object lifetime, at the end of the activate_proxy method.