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:
@@ -155,8 +155,8 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
|||||||
html = new wxHtmlWindow(&dlg, wxID_ANY, wxDefaultPosition, wxSize(380, 160), wxHW_SCROLLBAR_NEVER);
|
html = new wxHtmlWindow(&dlg, wxID_ANY, wxDefaultPosition, wxSize(380, 160), wxHW_SCROLLBAR_NEVER);
|
||||||
html -> SetBorders(0);
|
html -> SetBorders(0);
|
||||||
html -> LoadPage(wxT("data/about.htm"));
|
html -> LoadPage(wxT("data/about.htm"));
|
||||||
html -> SetSize(html -> GetInternalRepresentation() -> GetWidth(),
|
html -> SetInitialSize(wxSize(html -> GetInternalRepresentation() -> GetWidth(),
|
||||||
html -> GetInternalRepresentation() -> GetHeight());
|
html -> GetInternalRepresentation() -> GetHeight()));
|
||||||
|
|
||||||
topsizer -> Add(html, 1, wxALL, 10);
|
topsizer -> Add(html, 1, wxALL, 10);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user