#------------------------------------------------------------------------------
# Copyright (c) 2012, Enthought, Inc.
# All rights reserved.
#------------------------------------------------------------------------------
""" An example of the `Slider` widget.
This example demonstrates the use of a simple `Slider` control which is
used to compute the log of a range of numbers.
"""
import math
from enaml.widgets.api import Window, Form, Label, Field, Slider
enamldef Main(Window):
title = 'Slider Example'
Form:
Label:
text = 'Log Value'
Field:
text << u'{}'.format(math.log(val_slider.value))
read_only = True
Slider:
id: val_slider
tick_interval = 50
maximum = 1000
minimum = 1