wxFrame::Fit

void Fit(void)

Reize the frame to just fit around the subwindows. If a frame has only one subwindow, that subwindow will be resized by the default wxFrame::OnSize member to fit inside the frame.