Page Contents

This Page

Slider

class enaml.widgets.slider.Slider(parent=None, **kwargs)[source]

Bases: enaml.widgets.control.Control

A simple slider widget that can be used to select from a range of integral values.

minimum = None

The minimum value for the slider. To avoid issues where minimum is higher than maximum. The value is a positive integer capped by the maximum. If the new value of minimum make the current position invalid then the current position is set to :attr:minimum. Default value is 0.

maximum = None

The maximum value for the slider. Checks make sure that maximum cannot be lower than minimum. If the new value of maximum make the current position invalid then the current position is set to :attr:maximum. The max value is restricted to 65535, while the default is 100.

value = None

The position value of the Slider. The bounds are defined by :attr:minimum: and :attr:maximum:.

single_step = None

Defines the number of steps that the slider will move when the user presses the arrow keys. The default is 1. An upper limit may be imposed according the limits of the client widget.

page_step = None

Defines the number of steps that the slider will move when the user presses the page_up/page_down keys. The Default is 10. An upper limit may be imposed on this value according to the limits of the client widget.

tick_position = None

A TickPosition enum value indicating how to display the tick marks. Note that the orientation takes precedence over the tick mark position and an incompatible tick position will be adapted according to the current orientation. The default tick position is ‘bottom’.

tick_interval = None

The interval to place between slider tick marks in units of value (as opposed to pixels). The minimum value is 0, which indicates that the choice is left up to the client.

orientation = None

The orientation of the slider. The default orientation is horizontal. When the orientation is flipped the tick positions (if set) also adapt to reflect the changes (e.g. the LEFT becomes TOP when the orientation becomes horizontal).

tracking = None

If True, the value is updated while sliding. Otherwise, it is only updated when the slider is released. Defaults to True.

hug_width = None

Hug width is redefined as a property to be computed based on the orientation of the slider unless overridden by the user.

hug_height = None

Hug height is redefined as a property to be computed based on the orientation of the slider unless overridden by the user.

snapshot()[source]

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

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.

The content will contain the ‘value’ of the slider.

__implements__

alias of __NoInterface__

Backends

Qt

Inheritance diagram of enaml.qt.qt_slider.QtSlider

class enaml.qt.qt_slider.QtSlider(object_id, parent, session)[source]

Bases: enaml.qt.qt_control.QtControl

A Qt implementation of an Enaml Slider.

create_widget(parent, tree)[source]

Create the underlying QSlider widget.

create(tree)[source]

Create and initialize the underlying widget.

on_action_set_value(content)[source]

Handle the ‘set_value’ action from the Enaml widget.

on_action_set_maximum(content)[source]

Handle the ‘set_maximum’ action from the Enaml widget.

on_action_set_minimum(content)[source]

Handle the ‘set_minimum’ action from the Enaml widget.

on_action_set_orientation(content)[source]

Handle the ‘set_orientation’ action from the Enaml widget.

on_action_set_page_step(content)[source]

Handle the ‘set_page_step’ action from the Enaml widget.

on_action_set_single_step(content)[source]

Handle the ‘set_single_step’ action from the Enaml widget.

on_action_set_tick_interval(content)[source]

Handle the ‘set_tick_interval’ action from the Enaml widget.

on_action_set_tick_position(content)[source]

Handle the ‘set_tick_position’ action from the Enaml widget.

on_action_set_tracking(content)[source]

Handle the ‘set_tracking’ action from the Enaml widget.

on_value_changed()[source]

Send the ‘value_changed’ action to the Enaml widget when the slider value has changed.

set_value(value)[source]

Set the value of the underlying widget.

set_maximum(maximum)[source]

Set the maximum value of the underlying widget.

set_minimum(minimum)[source]

Set the minimum value of the underlying widget.

set_orientation(orientation)[source]

Set the orientation of the underlying widget.

set_page_step(page_step)[source]

Set the page step of the underlying widget.

set_single_step(single_step)[source]

Set the single step of the underlying widget.

set_tick_interval(interval)[source]

Set the tick interval of the underlying widget.

set_tick_position(tick_position)[source]

Set the tick position of the underlying widget.

set_tracking(tracking)[source]

Set the tracking of the underlying widget.

Wx

Inheritance diagram of enaml.wx.wx_slider.WxSlider

class enaml.wx.wx_slider.WxSlider(object_id, parent, session)[source]

Bases: enaml.wx.wx_control.WxControl

A Wx implementation of an Enaml Slider.

create_widget(parent, tree)[source]

Create the underlying wxProperSlider widget.

create(tree)[source]

Create and initialize the slider control.

on_action_set_value(content)[source]

Handle the ‘set_value’ action from the Enaml widget.

on_action_set_maximum(content)[source]

Handle the ‘set_maximum’ action from the Enaml widget.

on_action_set_minimum(content)[source]

Handle the ‘set_minimum’ action from the Enaml widget.

on_action_set_orientation(content)[source]

Handle the ‘set_orientation’ action from the Enaml widget.

on_action_set_page_step(content)[source]

Handle the ‘set_page_step’ action from the Enaml widget.

on_action_set_single_step(content)[source]

Handle the ‘set_single_step’ action from the Enaml widget.

on_action_set_tick_interval(content)[source]

Handle the ‘set_tick_interval’ action from the Enaml widget.

on_action_set_tick_position(content)[source]

Handle the ‘set_tick_position’ action from the Enaml widget.

on_action_set_tracking(content)[source]

Handle the ‘set_tracking’ action from the Enaml widget.

on_value_changed(event)[source]

Send the ‘value_changed’ action to the Enaml widget when the slider value has changed.

set_value(value)[source]

Set the value of the underlying widget.

set_maximum(maximum)[source]

Set the maximum value of the underlying widget.

set_minimum(minimum)[source]

Set the minimum value of the underlying widget.

set_orientation(orientation)[source]

Set the orientation of the underlying widget.

set_page_step(page_step)[source]

Set the page step of the underlying widget.

set_single_step(single_step)[source]

Set the single step of the underlying widget.

set_tick_interval(interval)[source]

Set the tick interval of the underlying widget.

set_tick_position(tick_position)[source]

Set the tick position of the underlying widget.

set_tracking(tracking)[source]

Set the tracking of the underlying widget.