Use SetInitialSize() in the about wxHTML sample.
SetSize() is useless here as it is simply ignored by the sizer which will fit the window to its initial size anyhow. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
012ccdf8a5
commit
570926f0d7
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user