Page Contents

This Page

SpinBox

class enaml.widgets.spin_box.SpinBox(parent=None, **kwargs)[source]

Bases: enaml.widgets.control.Control

A spin box widget which manipulates integer values.

minimum = None

The minimum value for the spin box. Defaults to 0.

maximum = None

The maximum value for the spin box. Defaults to 100.

value = None

The current integer value for the spin box, constrained to minimum <= value <= maximum.

prefix = None

An optional prefix to include in the displayed text.

suffix = None

An optional suffix to include in the displayed text.

special_value_text = None

Optional text to display when the spin box is at its minimum. This allows the developer to indicate to the user a special significance to the minimum value e.g. “Auto”

single_step = None

The step size for the spin box. Defaults to 1.

read_only = None

Whether or not the spin box is read-only. If True, the user will not be able to edit the values in the spin box, but they will still be able to copy the text to the clipboard.

wrapping = None

Whether or not the spin box will wrap around at its extremes. Defaults to False.

hug_width = None

How strongly a component hugs it’s contents’ width. SpinBoxes ignore the width hug by default, so they expand freely in width.

snapshot()[source]

Return the dict of creation attributes for the control.

bind()[source]

A method called after initialization which allows the widget to bind any event handlers necessary.

on_action_value_changed(content)[source]

Handle the ‘value_changed’ action from the client widget.

__implements__

alias of __NoInterface__

Backends

Qt

Inheritance diagram of enaml.qt.qt_spin_box.QtSpinBox

class enaml.qt.qt_spin_box.QtSpinBox(object_id, parent, session)[source]

Bases: enaml.qt.qt_control.QtControl

A Qt implementation of an Enaml SpinBox.

create_widget(parent, tree)[source]

Create the underlying QSpinBox widget.

create(tree)[source]

Create and initialize the underlying widget.

on_value_changed()[source]

The signal handler for the ‘valueChanged’ signal.

on_action_set_maximum(content)[source]

Handler for the ‘set_maximum’ action from the Enaml widget.

on_action_set_minimum(content)[source]

Handler for the ‘set_minimum’ action from the Enaml widget.

on_action_set_value(content)[source]

Handler for the ‘set_value’ action from the Enaml widget.

on_action_set_prefix(content)[source]

Handler for the ‘set_prefix’ action from the Enaml widget.

on_action_set_suffix(content)[source]

Handler for the ‘set_suffix’ action from the Enaml widget.

on_action_set_special_value_text(content)[source]

Handler for the ‘set_special_value_text’ action from the Enaml widget.

on_action_set_single_step(content)[source]

Handler for the ‘set_single_step’ action from the Enaml widget.

on_action_set_read_only(content)[source]

Handler for the ‘set_read_only’ action from the Enaml widget.

on_action_set_wrapping(content)[source]

Handler for the ‘set_wrapping’ action from the Enaml widget.

set_maximum(maximum)[source]

Set the widget’s maximum value.

set_minimum(minimum)[source]

Set the widget’s minimum value.

set_value(value)[source]

Set the spin box’s value.

set_prefix(prefix)[source]

Set the prefix for the spin box.

set_suffix(suffix)[source]

Set the suffix for the spin box.

set_special_value_text(text)[source]

Set the special value text for the spin box.

set_single_step(step)[source]

Set the widget’s single step value.

set_read_only(read_only)[source]

Set the widget’s read only flag.

set_wrapping(wrapping)[source]

Set the widget’s wrapping flag.

Wx

Inheritance diagram of enaml.wx.wx_spin_box.WxSpinBox

class enaml.wx.wx_spin_box.WxSpinBox(object_id, parent, session)[source]

Bases: enaml.wx.wx_control.WxControl

A Wx implementation of an Enaml SpinBox.

create_widget(parent, tree)[source]

Create the underlying wxProperSpinBox widget.

create(tree)[source]

Create and initialize the slider control.

on_value_changed(event)[source]

The event handler for the ‘EVT_SPIN_BOX’ event.

on_action_set_maximum(content)[source]

Handler for the ‘set_maximum’ action from the Enaml widget.

on_action_set_minimum(content)[source]

Handler for the ‘set_minimum’ action from the Enaml widget.

on_action_set_value(content)[source]

Handler for the ‘set_value’ action from the Enaml widget.

on_action_set_prefix(content)[source]

Handler for the ‘set_prefix’ action from the Enaml widget.

on_action_set_suffix(content)[source]

Handler for the ‘set_suffix’ action from the Enaml widget.

on_action_set_special_value_text(content)[source]

Handler for the ‘set_special_value_text’ action from the Enaml widget.

on_action_set_single_step(content)[source]

Handler for the ‘set_single_step’ action from the Enaml widget.

on_action_set_read_only(content)[source]

Handler for the ‘set_read_only’ action from the Enaml widget.

on_action_set_wrapping(content)[source]

Handler for the ‘set_wrapping’ action from the Enaml widget.

set_maximum(maximum)[source]

Set the widget’s maximum value.

set_minimum(minimum)[source]

Set the widget’s minimum value.

set_value(value)[source]

Set the spin box’s value.

set_prefix(prefix)[source]

Set the prefix for the spin box.

set_suffix(suffix)[source]

Set the suffix for the spin box.

set_special_value_text(text)[source]

Set the special value text for the spin box.

set_single_step(step)[source]

Set the widget’s single step value.

set_read_only(read_only)[source]

Set the widget’s read only flag.

set_wrapping(wrapping)[source]

Set the widget’s wrapping flag.