X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5e173f35d2a8177371d13d059d9f897e2c4f98be..2361ce822f82cd4964066319b2253562bf4de84b:/samples/widgets/spinbtn.cpp diff --git a/samples/widgets/spinbtn.cpp b/samples/widgets/spinbtn.cpp index f63898e586..609870b89a 100644 --- a/samples/widgets/spinbtn.cpp +++ b/samples/widgets/spinbtn.cpp @@ -41,7 +41,7 @@ #include "wx/sizer.h" #include "widgets.h" - +#if 1 #include "icons/spinbtn.xpm" // ---------------------------------------------------------------------------- @@ -165,6 +165,13 @@ SpinBtnWidgetsPage::SpinBtnWidgetsPage(wxNotebook *notebook, wxImageList *imaglist) : WidgetsPage(notebook) { + m_chkVert = NULL; + m_chkWrap = NULL; + m_spinbtn = NULL; + m_spinctrl = NULL; + m_textValue = NULL; + m_textMin = NULL; + m_textMax = NULL; imaglist->Add(wxBitmap(spinbtn_xpm)); // init everything @@ -224,7 +231,7 @@ SpinBtnWidgetsPage::SpinBtnWidgetsPage(wxNotebook *notebook, // right pane wxSizer *sizerRight = new wxBoxSizer(wxVERTICAL); - sizerRight->SetMinSize(250, 0); + sizerRight->SetMinSize(150, 0); m_sizerSpin = sizerRight; // save it to modify it later Reset(); @@ -232,7 +239,7 @@ SpinBtnWidgetsPage::SpinBtnWidgetsPage(wxNotebook *notebook, // the 3 panes panes compose the window sizerTop->Add(sizerLeft, 0, wxGROW | (wxALL & ~wxLEFT), 10); - sizerTop->Add(sizerMiddle, 1, wxGROW | wxALL, 10); + sizerTop->Add(sizerMiddle, 0, wxGROW | wxALL, 10); sizerTop->Add(sizerRight, 1, wxGROW | (wxALL & ~wxRIGHT), 10); // final initializations @@ -410,6 +417,8 @@ void SpinBtnWidgetsPage::OnSpinBtnDown(wxCommandEvent& event) void SpinBtnWidgetsPage::OnSpinCtrl(wxCommandEvent& event) { + if (!m_spinctrl) + return; int value = event.GetInt(); wxASSERT_MSG( value == m_spinctrl->GetValue(), @@ -417,3 +426,4 @@ void SpinBtnWidgetsPage::OnSpinCtrl(wxCommandEvent& event) wxLogMessage(_T("Spin control value changed, now %d"), value); } +#endif