Mercurial > code > home > repos > light9
comparison light8/uihelpers.py @ 51:71489bb71528
- Meet Fader. He is going to grow up and be a crossfader some day
- Meet Fader. He is going to grow up and be a crossfader some day
(tomarrow)
- Tkinter -> Tix so we can use ScrolledListBox which has a command
- Some improvements to Cue
- Cues need to specify their final values
- Cues are imported by subs. This should be fixed for style points.
- Some other cleanups
author | dmcc |
---|---|
date | Sun, 07 Jul 2002 15:40:45 +0000 |
parents | 2ae11dc56b38 |
children | 065896b0913c |
comparison
equal
deleted
inserted
replaced
50:5ff08b489693 | 51:71489bb71528 |
---|---|
1 """all the tiny tk helper functions""" | 1 """all the tiny tk helper functions""" |
2 | |
2 from __future__ import nested_scopes | 3 from __future__ import nested_scopes |
3 from Tkinter import * | 4 from Tkinter import * |
5 from Tix import * | |
4 from types import StringType | 6 from types import StringType |
5 | 7 |
6 def make_frame(parent): | 8 def make_frame(parent): |
7 f = Frame(parent, bd=0) | 9 f = Frame(parent, bd=0) |
8 f.pack(side='left') | 10 f.pack(side='left') |
12 root.bind(key, func) | 14 root.bind(key, func) |
13 for w in root.winfo_children(): | 15 for w in root.winfo_children(): |
14 w.bind(key, func) | 16 w.bind(key, func) |
15 | 17 |
16 def toplevelat(x,y,w=None,h=None): | 18 def toplevelat(x,y,w=None,h=None): |
17 tl=Toplevel() | 19 tl = Toplevel() |
18 if w and h: | 20 if w and h: |
19 tl.wm_geometry("%dx%d+%d+%d"%(w,h,x,y)) | 21 tl.wm_geometry("%dx%d+%d+%d" % (w,h,x,y)) |
20 else: | 22 else: |
21 tl.wm_geometry("+%d+%d"%(x,y)) | 23 tl.wm_geometry("+%d+%d" % (x,y)) |
22 return tl | 24 return tl |
23 | 25 |
24 def toggle_slider(s): | 26 def toggle_slider(s): |
25 if s.get() == 0: | 27 if s.get() == 0: |
26 s.set(100) | 28 s.set(100) |