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
 
@@ -46,13 +46,13 @@ class Lightboard:
 
        stage_tl = toplevelat(22,30)
 
        s = stage.Stage(stage_tl)
 
        stage.createlights(s)
 
        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,
 
                                   Subs, self.xfader, self.changelevel,
 
                                   self.subediting, Subs.longestsubname())
 

	
light8/panels.py
Show inline comments
 
@@ -84,14 +84,15 @@ class Subpanels:
 
        
 
        sublist = Subs.subs.items()
 
        sublist.sort()
 

	
 
        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
 
            else:
 
                effectsparent = sw.window
 

	
light8/uihelpers.py
Show inline comments
 
@@ -47,16 +47,12 @@ def eventtoparent(ev,sequence):
 
#    evdict['button']=ev.num
 
    par=ev.widget.winfo_parent()
 
    if par!=".":
 
        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"
 
    lev=float(txt)/100
 
    low=(80,80,180)
 
    high=(255,55,050)
0 comments (0 inline, 0 general)