1

I am creating a GUI which have a main window, which is wxFrame, on the main window there has a button. In the main window class, I have members which is a wxMiniFrame, and a wxPanel.

The scenario is when I click the button a new wxMiniFrame will be create and the Panel will be reparent to the wxMiniFrame, when the mini Frame is closed, I want the wxPanel to be reparent to the main window.

Is there any method to detect the miniframe is closed so that I can reparent the Panel?

Thanks in advance!

user2753594
  • 145
  • 4
  • 15
  • The wxMiniFrame has a close button on the right top corner, when I click it the miniFrame will be destroy and the wxPanel will also be destroy as it current parent is the miniFrame, but I want to keep the Panel. Is it possible to hide the miniFrame instead of closing it when I click that button? – user2753594 Jun 23 '14 at 10:01

1 Answers1

1

Handling the usual wxEVT_CLOSE_WINDOW should work fine for mini frames too.

In any case, you can always do it from your wxMiniFrame-derived class dtor.

VZ.
  • 21,740
  • 3
  • 39
  • 42
  • Is it possible to hide the miniframe instead of closing it when I click the close button on the top right corner? – user2753594 Jun 23 '14 at 09:50
  • I have another problem, when the mini frame is create, it always display on the top, even though I click on the main frame. – user2753594 Jun 25 '14 at 07:11