Page Contents

This Page

SplitItem

class enaml.widgets.split_item.SplitItem(parent=None, **kwargs)[source]

Bases: enaml.widgets.widget.Widget

A widget which can be used as an item in a Splitter.

A SplitItem is a widget which can be used as a child of a Splitter widget. It can have at most a single child widget which is an instance of Container.

stretch = None

The stretch factor for this item. The stretch factor determines how much an item is resized relative to its neighbors when the splitter space is allocated.

collapsible = None

Whether or not the item can be collapsed to zero width by the user. This holds regardless of the minimum size of the item.

split_widget = None

A read only property which returns the split widget.

preferred_size = None

This is a deprecated attribute. It should no longer be used.

snapshot()[source]

Return the dict of creation attributes for the control.

bind()[source]

Bind the change handlers for the widget.

__implements__

alias of __NoInterface__

Backends

Qt

digraph inheritance6546d46c3c { rankdir=LR; width=8.0; ratio=compress; fontsize=14; size="8.0, 12.0"; "QtWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.widget.Widget.html#enaml.qt.qt_widget.QtWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtObject" -> "QtWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtObject" [shape=box,style="setlinewidth(0.5)",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25]; "QtSplitItem" [style="setlinewidth(0.5)",URL="#enaml.qt.qt_split_item.QtSplitItem",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtWidget" -> "QtSplitItem" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

class enaml.qt.qt_split_item.QtSplitItem(object_id, parent, session)[source]

Bases: enaml.qt.qt_widget.QtWidget

A Qt implementation of an Enaml SplitItem.

create_widget(parent, tree)[source]

Create the underlying QStackItem widget.

create(tree)[source]

Create and initialize the underyling widget.

init_layout()[source]

Initialize the layout for the underyling widget.

split_widget()[source]

Find and return the split widget child for this widget.

Returns:result (QWidget or None) – The split widget defined for this widget, or None if one is not defined.
child_removed(child)[source]

Handle the child removed event for a QtSplitItem.

child_added(child)[source]

Handle the child added event for a QtSplitItem.

on_action_set_stretch(content)[source]

Handle the ‘set_stretch’ action from the Enaml widget.

on_action_set_collapsible(content)[source]

Handle the ‘set_collapsible’ action from the Enaml widget.

set_stretch(stretch)[source]

Set the stretch factor for the underlying widget.

set_collapsible(collapsible)[source]

Set the collapsible flag for the underlying widget.

Wx

digraph inheritanceee7d893e04 { rankdir=LR; width=8.0; ratio=compress; fontsize=14; size="8.0, 12.0"; "WxObject" [shape=box,style="setlinewidth(0.5)",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25]; "WxSplitItem" [style="setlinewidth(0.5)",URL="#enaml.wx.wx_split_item.WxSplitItem",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "WxWidget" -> "WxSplitItem" [arrowsize=0.5,style="setlinewidth(0.5)"]; "WxWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.widget.Widget.html#enaml.wx.wx_widget.WxWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "WxObject" -> "WxWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

class enaml.wx.wx_split_item.WxSplitItem(object_id, parent, session)[source]

Bases: enaml.wx.wx_widget.WxWidget

A Wx implementation of an Enaml SplitItem.

create_widget(parent, tree)[source]

Create the underlying QStackItem widget.

create(tree)[source]

Create and initialize the underyling widget.

init_layout()[source]

Initialize the layout for the underyling widget.

split_widget()[source]

Find and return the split widget child for this widget.

Returns:result (wxWindow or None) – The split widget defined for this widget, or None if one is not defined.
child_removed(child)[source]

Handle the child removed event for a WxSplitItem.

child_added(child)[source]

Handle the child added event for a QtSplitItem.

on_action_set_stretch(content)[source]

Handle the ‘set_stretch’ action from the Enaml widget.

on_action_set_collapsible(content)[source]

Handle the ‘set_collapsible’ action from the Enaml widget.

set_stretch(stretch)[source]

Set the stretch factor for the underlying widget.

set_collapsible(collapsible)[source]

Set the collapsible flag for the underlying widget.