|
From: Andy T. <an...@cr...> - 2001-08-27 23:20:57
|
Kevin Altis wrote: >>Anyway, I'm trying to set the application focus in response to an event. >>In particular, when the user presses a button in my application I would >>like to lead them by the hand and place the cursor in another widget. >> > > Robin just showed me how stupid I was and after recovering from some > dizziness due to banging my head against the desk I added a setFocus method > to Widget. So, for any widget, you can do something like: > > self.components.field1.setFocus() > > If you want to remove the focus, then use: > > self.components.field1.setFocus(0) > > The change is checked into cvs. > > ka > Ta muchly, hope the pain subsides quickly. I'll include it in the next version of dbBrowser to show a working example. Regards, Andy -- ----------------------------------------------------------------------- From the desk of Andrew J Todd esq. "Shave my poodle!" |