Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------
CreateButton();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------
Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
void CheckBoxWidgetsPage::Reset()
sz->Add(boxleft, 0, wxGROW|wxALL, 5);
sz->Add(m_sizer, 1, wxGROW|wxALL, 5);
- SetSizerAndFit(sz);
+ SetSizer(sz);
}
void ColourPickerWidgetsPage::CreatePicker()
Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------
Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
void DatePickerWidgetsPage::Reset()
Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
void DirCtrlWidgetsPage::Reset()
sz->Add(boxleft, 0, wxGROW|wxALL, 5);
sz->Add(m_sizer, 1, wxGROW|wxALL, 5);
- SetSizerAndFit(sz);
+ SetSizer(sz);
}
void DirPickerWidgetsPage::CreatePicker()
sz->Add(boxleft, 0, wxGROW|wxALL, 5);
sz->Add(m_sizer, 1, wxGROW|wxALL, 5);
- SetSizerAndFit(sz);
+ SetSizer(sz);
}
void FilePickerWidgetsPage::CreatePicker()
sz->Add(boxleft, 0, wxGROW|wxALL, 5);
sz->Add(m_sizer, 1, wxGROW|wxALL, 5);
- SetSizerAndFit(sz);
+ SetSizer(sz);
}
void FontPickerWidgetsPage::CreatePicker()
Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
GaugeWidgetsPage::~GaugeWidgetsPage()
Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
void HyperlinkWidgetsPage::Reset()
Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------
#endif // USE_ICONS_IN_BOOK
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
BookWidgetsPage::~BookWidgetsPage()
Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------
// final initializations
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------
// final initializations
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------
// final initializations
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------
Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------
sizerTop->Add(m_sizerText, 1, wxGROW | (wxALL & ~wxRIGHT), 10);
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
// ----------------------------------------------------------------------------
Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
void ToggleWidgetsPage::Reset()
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 )