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

Inheritance diagram of enaml.qt.qt_scroll_area.QtScrollArea

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.

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

Inheritance diagram of enaml.wx.wx_scroll_area.WxScrollArea

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.

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.