changeset 61:2508c6b7a4e0

scrolled sub panels which work
author drewp
date Tue, 09 Jul 2002 07:52:48 +0000
parents f177a2ff34f5
children 2f2eb802e93d
files light8/Lightboard.py light8/panels.py light8/uihelpers.py
diffstat 3 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/light8/Lightboard.py	Tue Jul 09 07:36:45 2002 +0000
+++ b/light8/Lightboard.py	Tue Jul 09 07:52:48 2002 +0000
@@ -49,7 +49,7 @@
         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,
--- a/light8/panels.py	Tue Jul 09 07:36:45 2002 +0000
+++ b/light8/panels.py	Tue Jul 09 07:52:48 2002 +0000
@@ -87,8 +87,9 @@
 
         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
--- a/light8/uihelpers.py	Tue Jul 09 07:36:45 2002 +0000
+++ b/light8/uihelpers.py	Tue Jul 09 07:52:48 2002 +0000
@@ -50,10 +50,6 @@
         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"