]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/spinbtn.cpp
changes wxDirExists() to accept wxString instead of wxChar*, so that it can be used...
[wxWidgets.git] / samples / widgets / spinbtn.cpp
index e5c7fc444cadf34e02369ee7285759c75c19f282..63f8e9c353f7550941cb73e098f6ff3c58fa0c28 100644 (file)
@@ -266,8 +266,6 @@ void SpinBtnWidgetsPage::CreateContent()
 
     // final initializations
     SetSizer(sizerTop);
-
-    sizerTop->Fit(this);
 }
 
 // ----------------------------------------------------------------------------
@@ -353,7 +351,7 @@ void SpinBtnWidgetsPage::OnButtonSetMinAndMax(wxCommandEvent& WXUNUSED(event))
          maxNew = 0; // init to suppress compiler warning
     if ( !m_textMin->GetValue().ToLong(&minNew) ||
          !m_textMax->GetValue().ToLong(&maxNew) ||
-         minNew >= maxNew )
+         minNew > maxNew )
     {
         wxLogWarning(_T("Invalid min/max values for the spinbtn."));
 
@@ -392,7 +390,7 @@ void SpinBtnWidgetsPage::OnUpdateUIMinMaxButton(wxUpdateUIEvent& event)
     long mn, mx;
     event.Enable( m_textMin->GetValue().ToLong(&mn) &&
                   m_textMax->GetValue().ToLong(&mx) &&
-                  mn < mx);
+                  mn <= mx);
 }
 
 void SpinBtnWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& event)