MCPcopy Create free account
hub / github.com/ActiveState/code / tick

Function tick

recipes/Python/303062_IronPython_fadein_window/recipe-303062.py:41–52  ·  view source on GitHub ↗
(sender, event)

Source from the content-addressed store, hash-verified

39timer.Interval = 15
40
41def tick(sender, event):
42 val = opacity_tracker.Value + 1
43 if val >= opacity_tracker.Maximum:
44 # ok, we're done, set the opacity to maximum, stop the
45 # animation, and let the user play with the opacity manually
46 opacity_tracker.Value = opacity_tracker.Maximum
47 opacity_tracker.Minimum = 20 # don't let the user hurt themselves
48 opacity_tracker.Enabled = True
49
50 timer.Stop()
51 else:
52 opacity_tracker.Value = val
53
54timer.Tick += tick
55timer.Start()

Callers

nothing calls this directly

Calls 1

StopMethod · 0.45

Tested by

no test coverage detected