- wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
- if ( frame )
- {
- frame->SendSizeEvent();
- }
+ //
+ // notice that we must post the event, not send it, as the frame doesn't
+ // know that we're its status bar yet so laying it out right now wouldn't
+ // work correctly, we need to wait until we return to the main loop
+ PostSizeEventToParent();