Chronometer¶
Screenshot¶
Example¶
from enamlnative.widgets.api import *
enamldef ContentView(Flexbox):
flex_direction = "column"
Chronometer: cm:
text_size = 32
running = False
TextView:
text << "Elapsed: {} seconds".format(cm.ticks)
ToggleButton:
text = "Start"
text_on = "Stop"
text_off = "Start"
checked := cm.running
Declaration¶
- class enamlnative.widgets.chronometer.Chronometer(parent=None, **kwargs)[source]¶
Bases:
enamlnative.widgets.text_view.TextView
A simple control for displaying read-only text.
- base¶
Set the time that the count-up timer is in reference to.
- ticks¶
Tick counter
- format¶
Sets the format string used for display.
- direction¶
Counting direction
- mode¶
Defines the behavior when restarting If mode is resume it will continue otherwise it will reset the count.
- running¶
Start / stop the counter
- proxy¶
A reference to the ProxyLabel object.
Android Implementation¶
- class enamlnative.android.android_chronometer.AndroidChronometer[source]¶
Bases:
enamlnative.android.android_text_view.AndroidTextView
,enamlnative.widgets.chronometer.ProxyChronometer
An Android implementation of an Enaml ProxyChronometer.
- widget¶
A reference to the widget created by the proxy.
No iOS implementation found.