From: Kevin A. <al...@ya...> - 2005-04-01 17:11:57
|
I've come up with a potential solution to raising child windows when the main window is selected in the resourceEditor. This is actually a problem for any PythonCard application with child windows, but seems to be more of annoyance in the resourceEditor as the Property Editor window is always being lost behind other application windows. You can just drop the following code into resourceEditor.py and see whether this gives the behavior you would expect. I would like to get some feedback before I check it into cvs. If you have overlapping windows, most likely because you're working on a small screen, this solution of forcing a Raise could be very annoying, so I would likely add a menu item under Options that would allow you to disable the Raise. def on_activate(self, event): if not hasattr(self, 'inActivate') or not self.inActivate: self.inActivate = True for c in self.GetChildren(): c.Raise() self.Raise() self.inActivate = False #event.skip() On a related note, I never added lowercase aliases for Raise and Lower to the Background class because I wasn't sure if this would be legal since raise is a keyword and we need it for raising exceptions. If someone knows the correct syntax so that we can have a lowercase alias to Raise I'll add it to the class; perhaps I could just do a setattr or something?! raise = wx.Frame.Raise ka __________________________________ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs |