Changeset - 2508c6b7a4e0
[Not reviewed]
default
0 3 0
drewp - 22 years ago 2002-07-09 07:52:48

scrolled sub panels which work
3 files changed with 4 insertions and 7 deletions:
0 comments (0 inline, 0 general)
light8/Lightboard.py
Show inline comments
 
@@ -49,7 +49,7 @@ class Lightboard:
 
        s.setsubediting(self.subediting)
 
        s.pack()
 

	
 
        sub_tl = toplevelat(0,0)
 
        sub_tl = toplevelat(0,0,w=440,h=610)
 
        effect_tl = toplevelat(462,4)
 

	
 
        self.subpanels = Subpanels(sub_tl, effect_tl, self, self.scalelevels,
light8/panels.py
Show inline comments
 
@@ -87,8 +87,9 @@ class Subpanels:
 

	
 
        for p in scenesparent,effectsparent:
 
            sw = ScrolledWindow(p)
 
            sw.window.bind("<ButtonPress-4>",lambda s=sw.vsb: scrollscrolledwindow(s,-1))
 
            sw.window.bind("<ButtonPress-5>",lambda s=sw.vsb: scrollscrolledwindow(s,1))
 
            for but,units in ( (4,-4),(5,4) ):
 
                sw.window.bind("<ButtonPress-%s>"%but,lambda ev,s=sw.vsb,u=units: s.tk.call('tkScrollByUnits',s,'hv',u))
 

	
 
            sw.pack(expand=1,fill=BOTH)
 
            if p==scenesparent:
 
                scenesparent = sw.window
light8/uihelpers.py
Show inline comments
 
@@ -50,10 +50,6 @@ def eventtoparent(ev,sequence):
 
        ev.widget.nametowidget(par).event_generate(sequence,**evdict)
 
    #else the event made it all the way to the top, unhandled
 

	
 
def scrollscrolledwindow(widget,amount):
 
    print "scroll",widget,amount
 
    
 

	
 
def colorlabel(label):
 
    """color a label based on its own text"""
 
    txt=label['text'] or "0"
0 comments (0 inline, 0 general)