From: Liam C. <cy...@gm...> - 2005-03-05 11:58:17
|
Hi all, Is there a way to call setFocus on the window when it opens? I have 3 windows - Main | ChildA | ChildB ChildA opens ChildB, assigns Main as the parent of ChildB and then closes itself. This is fine except Main is now in the foreground, and B behind it.... I tried self.backgrounds['bgTemplate'].setFocus(), but that doesn't work, I'm currently using def on_initialize(self, event): self.components[self.components.keys()[0]].setFocus() in ChildB. This works, but it seems a bit hacky, and I get a flicker as Main moves to the front, and then B does, which is distracting. There's probably something very obvious I'm missing, there usually is, but any help would be appreciated. I used findfiles.py and all the returns for 'focus' related to findFocus and setFocus being called on widgets. Regards, Liam Clarke -- 'There is only one basic human right, and that is to do as you damn well please. And with it comes the only basic human duty, to take the consequences. |