How do I close all MDIChildFrames that are in a MDIParentFrame? Is there a built in function to do this?
frame = MyFrame(None) #MDIParentFrame
frame.Show()
child1 = MDIChildFrame(frame, "MDIChildFrame")
child1.Show()
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can try to get the client window through GetClientWindow() method, then get list of child windows for that client window through GetChildren(), iterate through this list, check whether child window is wxMDIChildFrame using IsKindOf() macro, if it returns true then call Close().
wxPython classes should have the same list of methods as C++ version.