On-demand creation of the pages for speedup of sample launch.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-06-06 14:10:06 +00:00
parent 3f60522a05
commit 453535a739
17 changed files with 151 additions and 15 deletions

View File

@@ -75,6 +75,9 @@ public:
virtual wxControl *GetWidget() const { return m_datePicker; }
virtual void RecreateWidget() { CreateDatePicker(); }
// lazy creation of the content
virtual void CreateContent();
protected:
// event handlers
void OnButtonSet(wxCommandEvent& event);
@@ -132,6 +135,10 @@ IMPLEMENT_WIDGETS_PAGE(DatePickerWidgetsPage, wxT("DatePicker"),
DatePickerWidgetsPage::DatePickerWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
:WidgetsPage(book, imaglist, datepick_xpm)
{
}
void DatePickerWidgetsPage::CreateContent()
{
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);