virtual wxControl *GetWidget() const { return m_checkbox; }
virtual void RecreateWidget() { CreateCheckbox(); }
+ // lazy creation of the content
+ virtual void CreateContent();
+
protected:
// event handlers
void OnCheckBox(wxCommandEvent& event);
CheckBoxWidgetsPage::CheckBoxWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
- : WidgetsPage(book)
+ : WidgetsPage(book, imaglist, checkbox_xpm)
{
- imaglist->Add(wxBitmap(checkbox_xpm));
+}
+void CheckBoxWidgetsPage::CreateContent()
+{
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
// left pane
Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
void CheckBoxWidgetsPage::Reset()