comparison clients/pychan_demo/pychan_test.py @ 222:c050f257cec3

PyChan: Now Widgets may _in principle_ receive key events.
author phoku@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 19 Mar 2009 20:14:49 +0000
parents 54bfd1015b35
children 756b895e1dab
comparison
equal deleted inserted replaced
221:e901bdec7578 222:c050f257cec3
66 } 66 }
67 self.gui.mapEvents(eventMap) 67 self.gui.mapEvents(eventMap)
68 credits = self.gui.findChild(name="creditsLink") 68 credits = self.gui.findChild(name="creditsLink")
69 credits.setEnterCallback(lambda w : credits._setText("CREDITS")) 69 credits.setEnterCallback(lambda w : credits._setText("CREDITS"))
70 credits.capture(lambda : credits._setText("Credits"), event_name="mouseExited") 70 credits.capture(lambda : credits._setText("Credits"), event_name="mouseExited")
71 def pr(event=None):
72 print event
73 self.gui.capture(pr,event_name="keyPressed")
71 74
72 from dynamic import DynamicExample 75 from dynamic import DynamicExample
73 from styling import StylingExample 76 from styling import StylingExample
74 77
75 self.examples = { 78 self.examples = {