comparison light8/uihelpers.py @ 78:0969d8a6729d

support for external sliders. fill in ExternalInput with real IO
author dmcc
date Fri, 12 Jul 2002 10:05:57 +0000
parents ab0be21b549b
children 09b3bf8a9201
comparison
equal deleted inserted replaced
77:5649f5d9c798 78:0969d8a6729d
24 def bindkeys(root,key, func): 24 def bindkeys(root,key, func):
25 root.bind(key, func) 25 root.bind(key, func)
26 for w in root.winfo_children(): 26 for w in root.winfo_children():
27 w.bind(key, func) 27 w.bind(key, func)
28 28
29 # def toplevelat(x,y,w=None,h=None): 29 def toplevelat(name):
30 def toplevelat(name, windowpos=None):
31 tl = Toplevel() 30 tl = Toplevel()
32 31
33 tl.wm_geometry(windowlocations[name]) 32 if name in windowlocations:
33 tl.wm_geometry(windowlocations[name])
34 34
35 # if name in windowpos:
36 # tkname, geom = windowpos[name]
37 # tl.wm_geometry(geom)
38 # windowpos[name] = str(tl), geom
39
40 # if w and h:
41 # tl.wm_geometry("%dx%d+%d+%d" % (w,h,x,y))
42 # else:
43 # tl.wm_geometry("+%d+%d" % (x,y))
44 return tl 35 return tl
45 36
46 def toggle_slider(s): 37 def toggle_slider(s):
47 if s.get() == 0: 38 if s.get() == 0:
48 s.set(100) 39 s.set(100)