#ifndef WX_PRECOMP
#include "wx/sizer.h"
#include "wx/statbox.h"
+ #include "wx/textctrl.h"
#endif
#include "icons/toggle.xpm"
virtual wxControl *GetWidget() const { return m_toggle; }
virtual void RecreateWidget() { CreateToggle(); }
+ // lazy creation of the content
+ virtual void CreateContent();
+
protected:
// event handlers
void OnButtonReset(wxCommandEvent& event);
ToggleWidgetsPage::ToggleWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
- :WidgetsPage(book)
+ :WidgetsPage(book, imaglist, toggle_xpm)
{
- imaglist->Add(wxBitmap(toggle_xpm));
+}
+void ToggleWidgetsPage::CreateContent()
+{
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
// left pane
Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
void ToggleWidgetsPage::Reset()