File: double_spin_box.enaml

package info (click to toggle)
python-enamlx 0.6.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 388 kB
  • sloc: python: 3,338; makefile: 18
file content (19 lines) | stat: -rw-r--r-- 531 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import enamlx
enamlx.install()
from enaml.widgets.api import Window, Form, Label, Field, SpinBox
from enaml.layout.api import hbox, vbox
from enamlx.widgets.api import DoubleSpinBox

enamldef Main(Window):
    title = 'DoubleSpinBox Example'
    Form:
        Label: lbl:
            text = 'Value'
        DoubleSpinBox: sbox:
            maximum = 100
            minimum = 0
            decimals = 9
            value = 1/25.4
        Field: fld:
            text << u'Value: {}'.format(sbox.value)
            read_only = True