Changeset - f177a2ff34f5
[Not reviewed]
default
0 1 0
drewp - 22 years ago 2002-07-09 07:36:45

scrolled sub panels
1 file changed with 14 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light8/panels.py
Show inline comments
 
@@ -82,12 +82,22 @@ class Subpanels:
 
                 scalelevels, Subs, xfader,
 
                 changelevel, subediting, longestname):
 
        
 
        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))
 
            sw.pack(expand=1,fill=BOTH)
 
            if p==scenesparent:
 
                scenesparent = sw.window
 
            else:
 
                effectsparent = sw.window
 

	
 
        for name, sub in sublist:
 
            # choose one of the sub panels to add to
 
            if sub.is_effect:
 
                parent=effectsparent
 
                side1='bottom'
 
                side2='left'
 
@@ -104,12 +114,13 @@ class Subpanels:
 
                end2=0
 
                width1=longestname
 

	
 
            # make frame that surrounds the whole submaster
 
            f=Frame(parent, bd=1, relief='raised')
 
            f.pack(fill='both',exp=1,side=side2)
 
            
 

	
 
            # make DoubleVar (there might be one left around from
 
            # before a refresh)
 
            if name not in scalelevels:
 
                scalelevels[name]=DoubleVar()
 

	
 
@@ -117,30 +128,30 @@ class Subpanels:
 

	
 
            scaleopts = {'troughcolor' : 'grey70'}
 
            if sub.color:
 
                scaleopts['troughcolor'] = sub.color
 

	
 
            s = FlyingFader(f, label=str(name), variable=scalelevels[name],
 
                            showvalue=0, length=300-17,
 
                            showvalue=0, length=100,
 
                            width=14, sliderlength=14,
 
                            to=end1,res=.001,from_=end2,bd=1, font=stdfont,
 
                            orient=orient1,
 
                            labelwidth=width1,
 
                            **scaleopts)
 

	
 
            # tell subediting what widget to highlight when it's
 
            # tell subediting what widgets to highlight when it's
 
            # editing a sub
 
            for w in (s,s.label,s.vlabel, s.scale):
 
                subediting.register(subname=name,widget=w)
 

	
 
            if not sub.is_effect:
 
                self.subeditingbuttons(f,side1,sub,name,lightboard,subediting)
 

	
 
            self.axisbuttons(f,s,xfader,stdfont,side1,name)
 

	
 
            s.pack(side='left', fill=BOTH)
 
            s.pack(side='left', fill=BOTH, expand=1)
 

	
 
            # effects frame?
 
            sframe = Frame(f,bd=2,relief='groove')
 
            sub.draw_tk(sframe)
 
            sframe.pack(side='left',fill='y')
 

	
0 comments (0 inline, 0 general)