// Created: 27 Sep 2003
// Id: $Id$
// Copyright: (c) 2006 Wlodzmierz Skiba
-// License: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
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, imaglist, toggle_xpm)
+{
+}
+
+void ToggleWidgetsPage::CreateContent()
{
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
// wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
// middle pane
- wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, _T("&Operations"));
+ wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, wxT("&Operations"));
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
wxSizer *sizerRow = CreateSizerWithTextAndButton(TogglePage_ChangeLabel,
- _T("Change label"),
+ wxT("Change label"),
wxID_ANY,
&m_textLabel);
- m_textLabel->SetValue(_T("&Toggle me!"));
+ m_textLabel->SetValue(wxT("&Toggle me!"));
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
Reset();
SetSizer(sizerTop);
-
- sizerTop->Fit(this);
}
void ToggleWidgetsPage::Reset()