fix initial layout of the widgets pages: avoid calling Fit() on them

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-12-03 13:43:44 +00:00
parent 70c536f394
commit be16b85933
22 changed files with 9 additions and 39 deletions

View File

@ -370,8 +370,6 @@ void BitmapComboBoxWidgetsPage::CreateContent()
Reset();
SetSizer(sizerTop);
sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------

View File

@ -275,8 +275,6 @@ void ButtonWidgetsPage::CreateContent()
CreateButton();
SetSizer(sizerTop);
sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------

View File

@ -233,8 +233,6 @@ void CheckBoxWidgetsPage::CreateContent()
Reset();
SetSizer(sizerTop);
sizerTop->Fit(this);
}
void CheckBoxWidgetsPage::Reset()

View File

@ -168,7 +168,7 @@ void ColourPickerWidgetsPage::CreateContent()
sz->Add(boxleft, 0, wxGROW|wxALL, 5);
sz->Add(m_sizer, 1, wxGROW|wxALL, 5);
SetSizerAndFit(sz);
SetSizer(sz);
}
void ColourPickerWidgetsPage::CreatePicker()

View File

@ -335,8 +335,6 @@ void ComboboxWidgetsPage::CreateContent()
Reset();
SetSizer(sizerTop);
sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------

View File

@ -178,8 +178,6 @@ void DatePickerWidgetsPage::CreateContent()
Reset();
SetSizer(sizerTop);
sizerTop->Fit(this);
}
void DatePickerWidgetsPage::Reset()

View File

@ -216,8 +216,6 @@ void DirCtrlWidgetsPage::CreateContent()
Reset();
SetSizer(sizerTop);
sizerTop->Fit(this);
}
void DirCtrlWidgetsPage::Reset()

View File

@ -170,7 +170,7 @@ void DirPickerWidgetsPage::CreateContent()
sz->Add(boxleft, 0, wxGROW|wxALL, 5);
sz->Add(m_sizer, 1, wxGROW|wxALL, 5);
SetSizerAndFit(sz);
SetSizer(sz);
}
void DirPickerWidgetsPage::CreatePicker()

View File

@ -191,7 +191,7 @@ void FilePickerWidgetsPage::CreateContent()
sz->Add(boxleft, 0, wxGROW|wxALL, 5);
sz->Add(m_sizer, 1, wxGROW|wxALL, 5);
SetSizerAndFit(sz);
SetSizer(sz);
}
void FilePickerWidgetsPage::CreatePicker()

View File

@ -170,7 +170,7 @@ void FontPickerWidgetsPage::CreateContent()
sz->Add(boxleft, 0, wxGROW|wxALL, 5);
sz->Add(m_sizer, 1, wxGROW|wxALL, 5);
SetSizerAndFit(sz);
SetSizer(sz);
}
void FontPickerWidgetsPage::CreatePicker()

View File

@ -261,8 +261,6 @@ void GaugeWidgetsPage::CreateContent()
Reset();
SetSizer(sizerTop);
sizerTop->Fit(this);
}
GaugeWidgetsPage::~GaugeWidgetsPage()

View File

@ -223,8 +223,6 @@ void HyperlinkWidgetsPage::CreateContent()
Reset();
SetSizer(sizerTop);
sizerTop->Fit(this);
}
void HyperlinkWidgetsPage::Reset()

View File

@ -334,8 +334,6 @@ void ListboxWidgetsPage::CreateContent()
Reset();
SetSizer(sizerTop);
sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------

View File

@ -295,8 +295,6 @@ void BookWidgetsPage::CreateContent()
#endif // USE_ICONS_IN_BOOK
SetSizer(sizerTop);
sizerTop->Fit(this);
}
BookWidgetsPage::~BookWidgetsPage()

View File

@ -464,8 +464,6 @@ void ODComboboxWidgetsPage::CreateContent()
Reset();
SetSizer(sizerTop);
sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------

View File

@ -302,8 +302,6 @@ void RadioWidgetsPage::CreateContent()
// final initializations
SetSizer(sizerTop);
sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------

View File

@ -360,8 +360,6 @@ void SliderWidgetsPage::CreateContent()
// final initializations
SetSizer(sizerTop);
sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------

View File

@ -266,8 +266,6 @@ void SpinBtnWidgetsPage::CreateContent()
// final initializations
SetSizer(sizerTop);
sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------

View File

@ -307,8 +307,6 @@ void StaticWidgetsPage::CreateContent()
Reset();
SetSizer(sizerTop);
sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------

View File

@ -559,8 +559,6 @@ void TextWidgetsPage::CreateContent()
sizerTop->Add(m_sizerText, 1, wxGROW | (wxALL & ~wxRIGHT), 10);
SetSizer(sizerTop);
sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------

View File

@ -163,8 +163,6 @@ void ToggleWidgetsPage::CreateContent()
Reset();
SetSizer(sizerTop);
sizerTop->Fit(this);
}
void ToggleWidgetsPage::Reset()

View File

@ -653,12 +653,16 @@ void WidgetsFrame::OnPageChanged(WidgetsBookCtrlEvent& event)
GetMenuBar()->Check(Widgets_BusyCursor, false);
// lazy creation of the pages
// create the pages on demand, otherwise the sample startup is too slow as
// it creates hundreds of controls
WidgetsPage *page = CurrentPage();
if ( page->GetChildren().empty() )
{
wxWindowUpdateLocker noUpdates(page);
page->CreateContent();
//page->Layout();
page->GetSizer()->Fit(page);
WidgetsBookCtrl *book = wxStaticCast(page->GetParent(), WidgetsBookCtrl);
wxSize size;
for ( size_t i = 0; i < book->GetPageCount(); ++i )