From: Bo G. <bo...@sy...> - 2005-04-05 19:07:14
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <a class="moz-txt-link-abbreviated" href="mailto:bra...@om...">bra...@om...</a> wrote: <blockquote cite="mid...@om..." type="cite"><br> <font size="2"><tt>Kevin Altis wrote on 04/01/2005 11:11:20 AM:<br> <br> > I've come up with a potential solution to raising<br> > child windows when the main window is selected in the<br> > resourceEditor. This is actually a problem for any<br> > PythonCard application with child windows, but seems<br> > to be more of annoyance in the resourceEditor as the<br> > Property Editor window is always being lost behind<br> > other application windows.<br> > <br> > You can just drop the following code into<br> > resourceEditor.py and see whether this gives the<br> > behavior you would expect. I would like to get some<br> > feedback before I check it into cvs. If you have<br> > overlapping windows, most likely because you're<br> > working on a small screen, this solution of forcing a<br> > Raise could be very annoying, so I would likely add a<br> > menu item under Options that would allow you to<br> > disable the Raise.<br> > <br> > def on_activate(self, event):<br> > if not hasattr(self, 'inActivate') or not<br> > self.inActivate:<br> > self.inActivate = True<br> > for c in self.GetChildren():<br> > c.Raise()<br> > self.Raise()<br> > self.inActivate = False<br> > #event.skip()<br> </tt></font> <br> <br> <font size="2"><tt>Thanks, I will try this.</tt></font> <br> <br> <font size="2"><tt><br> > On a related note, I never added lowercase aliases for<br> > Raise and Lower to the Background class because I<br> > wasn't sure if this would be legal since raise is a<br> > keyword and we need it for raising exceptions. If<br> > someone knows the correct syntax so that we can have a<br> > lowercase alias to Raise I'll add it to the class;<br> > perhaps I could just do a setattr or something?!<br> > <br> > raise = wx.Frame.Raise<br> </tt></font> <br> <font size="2"><tt>Are lowercase aliases used for a lot of other names in PythonCard or wx? <br> </tt></font> </blockquote> <br> I tried plugging this into resourceEditor.py on my Windows install, it didn't work. Quite likely that I screwed up somehow, but the focus keeps reverting to the property editor on every attempt to select the resource editor. I tried to be extra careful with indentation, but still not working here. <br> Bo<br> </body> </html> |