Page Contents

This Page

ScrollArea

class enaml.widgets.scroll_area.ScrollArea(parent=None, **kwargs)[source]

Bases: enaml.widgets.constraints_widget.ConstraintsWidget

A widget which displays a single child in a scrollable area.

A ScrollArea has at most a single child Container widget.

horizontal_policy = None

The horizontal scrollbar policy.

vertical_policy = None

The vertical scrollbar policy.

widget_resizable = None

Whether to resize the scroll widget when possible to avoid the need for scrollbars or to make use of extra space.

scroll_widget = None

A read only property which returns the scrolled widget.

hug_width = None

How strongly a component hugs it’s contents’ width. Scroll areas do not hug their width and are free to expand.

hug_height = None

How strongly a component hugs it’s contents’ height. Scroll areas do not hug their height and are free to expand.

snapshot()[source]

Return a dictionary which contains all the state necessary to initialize a client widget.

bind()[source]

Bind the change handlers for this widget.

__implements__

alias of __NoInterface__

Backends

Qt

digraph inheritance5c2f685fa5 { 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)"]; "QtConstraintsWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.constraints_widget.ConstraintsWidget.html#enaml.qt.qt_constraints_widget.QtConstraintsWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtWidget" -> "QtConstraintsWidget" [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]; "QtScrollArea" [style="setlinewidth(0.5)",URL="#enaml.qt.qt_scroll_area.QtScrollArea",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtConstraintsWidget" -> "QtScrollArea" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

class enaml.qt.qt_scroll_area.QtScrollArea(object_id, parent, session)[source]

Bases: enaml.qt.qt_constraints_widget.QtConstraintsWidget

A Qt implementation of an Enaml ScrollArea.

create_widget(parent, tree)[source]

Create the underlying QScrollArea widget.

create(tree)[source]

Create and initialize the underlying widget.

init_layout()[source]

Initialize the layout of the underlying widget.

scroll_widget()[source]

Find and return the scroll widget child for this widget.

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

Handle the child removed event for a QtScrollArea.

child_added(child)[source]

Handle the child added event for a QtScrollArea.

on_layout_requested()[source]

Handle the layoutRequested signal from the QScrollArea.

replace_constraints(old_cns, new_cns)[source]

A reimplemented QtConstraintsWidget layout method.

Constraints layout may not cross the boundary of a ScrollArea, so this method is no-op which stops the layout propagation.

clear_constraints(cns)[source]

A reimplemented QtConstraintsWidget layout method.

Constraints layout may not cross the boundary of a ScrollArea, so this method is no-op which stops the layout propagation.

on_action_set_horizontal_policy(content)[source]

Handle the ‘set_horizontal_policy’ action from the Enaml widget.

on_action_set_vertical_policy(content)[source]

Handle the ‘set_vertical_policy’ action from the Enaml widget.

on_action_set_widget_resizable(content)[source]

Handle the ‘set_widget_resizable’ action from the Enaml widget.

set_horizontal_policy(policy)[source]

Set the horizontal scrollbar policy of the widget.

set_vertical_policy(policy)[source]

Set the vertical scrollbar policy of the widget.

set_widget_resizable(resizable)[source]

Set whether or not the scroll widget is resizable.

Wx

digraph inheritancedbc586f670 { 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]; "WxScrollArea" [style="setlinewidth(0.5)",URL="#enaml.wx.wx_scroll_area.WxScrollArea",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "WxConstraintsWidget" -> "WxScrollArea" [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)"]; "WxConstraintsWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.constraints_widget.ConstraintsWidget.html#enaml.wx.wx_constraints_widget.WxConstraintsWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "WxWidget" -> "WxConstraintsWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

class enaml.wx.wx_scroll_area.WxScrollArea(object_id, parent, session)[source]

Bases: enaml.wx.wx_constraints_widget.WxConstraintsWidget

A Wx implementation of an Enaml ScrollArea.

create_widget(parent, tree)[source]

Create the underlying wxScrolledWindow widget.

create(tree)[source]

Create and initialize the scroll area widget.

init_layout()[source]

Handle the layout initialization for the scroll area.

scroll_widget()[source]

Find and return the scroll widget child for this widget.

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

Handle the child removed event for a WxScrollArea.

child_added(child)[source]

Handle the child added event for a WxScrollArea.

replace_constraints(old_cns, new_cns)[source]

A reimplemented WxConstraintsWidget layout method.

Constraints layout may not cross the boundary of a ScrollArea, so this method is no-op which stops the layout propagation.

clear_constraints(cns)[source]

A reimplemented WxConstraintsWidget layout method.

Constraints layout may not cross the boundary of a ScrollArea, so this method is no-op which stops the layout propagation.

on_action_set_horizontal_policy(content)[source]

Handle the ‘set_horizontal_policy’ action from the Enaml widget.

on_action_set_vertical_policy(content)[source]

Handle the ‘set_vertical_policy’ action from the Enaml widget.

on_action_set_widget_resizable(content)[source]

Handle the ‘set_widget_resizable’ action from the Enaml widget.

set_horizontal_policy(policy)[source]

Set the horizontal scrollbar policy of the widget.

set_vertical_policy(policy)[source]

Set the vertical scrollbar policy of the widget.

set_widget_resizable(resizable)[source]

Set whether or not the scroll widget is resizable.