]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/spinbtn.cpp
no, we shouldn't inconditionally add the separator at the end even if wxPATH_GET_SEPA...
[wxWidgets.git] / samples / widgets / spinbtn.cpp
index f63898e586de79aa3510bab06f530f1542a67049..609870b89a3905b4ef8db2acadab6dadc10eafb9 100644 (file)
@@ -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