From: Kevin A. <al...@se...> - 2004-04-15 17:53:01
|
On Apr 15, 2004, at 10:39 AM, ralph heimburger wrote: > Forgive my lack of extensive pythonic knowledge but wouldn't a tr work > better? > > Would I have to create a separate event for all 66 fields? > What's a tr? If you want a single keyPress handler to deal with all fields then just remove the field name from the event handler. def on_keyPress(self, event): The caveat is that any component that generates a keyPress event and doesn't have its own specific event handler will use that method (e.g. a ComboBox). So, the first thing you would want to do in the handler is check the component type or name or something that tells you that you have the right component and if not, just call event.skip() ka |