#------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#------------------------------------------------------------------------------
""" An example of the `SpinBox` widget.
This example demonstrates the use of a simple `SpinBox` control which is
used to select from a discrete range of integer values.
<< autodoc-me >>
"""
from enaml.widgets.api import Window, Form, Label, Field, SpinBox
from enaml.layout.api import hbox, vbox
enamldef Main(Window):
title = 'SpinBox Example'
Form:
Label: lbl:
text = 'Select Age'
SpinBox: sbox:
maximum = 100
minimum = 0
Field: fld:
text << u'Age: {}'.format(sbox.value)
read_only = True