Rescuing children frames
Raffaello Barella
barbarossa.platz at gmail.com
Thu Feb 28 02:04:34 PST 2008
In his book, Robin Dunn recommended to make a spare use of MDI frames. I
followed his advice and now feel much happier, with only one setback: if my
application gets hidden on the screen by one or more different ones,
clicking the icon in the bar raises only the parent frame and not its
children. I solved this menial problem by adding the following code to the
parent:
in __init__:
self.Bind(wx.EVT_PAINT, self.OnPaint)
and then:
def OnPaint(self, event):
event.Skip()
children =3D self.GetChildren()
for j in range(len(children)):
if isinstance(children[j], wx.Frame):
children[j].Raise()
Since the user is supposed to have some use for a child frame when she/he
opens it, I suggest to make this the standard behavior of the parent frame.
But, sorry, I am not yet able to write the underlying C++ code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200802=
28/c69018f6/attachment.htm
More information about the wxpython-users
mailing list