diff --git a/samples/html/about/about.cpp b/samples/html/about/about.cpp index 1aee180572..1a656fba77 100644 --- a/samples/html/about/about.cpp +++ b/samples/html/about/about.cpp @@ -155,8 +155,8 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) html = new wxHtmlWindow(&dlg, wxID_ANY, wxDefaultPosition, wxSize(380, 160), wxHW_SCROLLBAR_NEVER); html -> SetBorders(0); html -> LoadPage(wxT("data/about.htm")); - html -> SetSize(html -> GetInternalRepresentation() -> GetWidth(), - html -> GetInternalRepresentation() -> GetHeight()); + html -> SetInitialSize(wxSize(html -> GetInternalRepresentation() -> GetWidth(), + html -> GetInternalRepresentation() -> GetHeight())); topsizer -> Add(html, 1, wxALL, 10);