Mercurial > code > home > repos > light9
diff light8/uihelpers.py @ 102:e04f7b552bcd
- scroll wheel works everywhere
- scroll wheel works everywhere
- interface is white on black
- subs that start scenes are white
- more status information, startup process kinda cleaned up
author | dmcc |
---|---|
date | Sun, 14 Jul 2002 08:01:24 +0000 |
parents | a995fd1a8f03 |
children | 4136e92829e3 |
line wrap: on
line diff
--- a/light8/uihelpers.py Sun Jul 14 02:44:27 2002 +0000 +++ b/light8/uihelpers.py Sun Jul 14 08:01:24 2002 +0000 @@ -16,7 +16,7 @@ } def make_frame(parent): - f = Frame(parent, bd=0) + f = Frame(parent, bd=0, bg='black') f.pack(side='left') return f @@ -75,7 +75,12 @@ print "" def eventtoparent(ev,sequence): - "passes an event to the parent" + "passes an event to the parent, screws up TixComboBoxes" + + wid_class = str(ev.widget.__class__) + if wid_class == 'Tix.ComboBox' or wid_class == 'Tix.TixSubWidget': + return + evdict={} for x in ['state', 'time', 'y', 'x', 'serial']: evdict[x]=getattr(ev,x) @@ -208,8 +213,10 @@ else: print "FancyDoubleVar: attempted to delete named %s which wasn't set to any function" % name - - +def get_selection(listbox): + 'Given a listbox, returns first selection as integer' + selection = int(listbox.curselection()[0]) # blech + return selection if __name__=='__main__': root=Tk() @@ -221,12 +228,3 @@ t.pack() Entry(root,textvariable=iv).pack() root.mainloop() - - - - - - - - -