]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/controls/controls.cpp
fixed mouse input handling in wxUniv: the static boxes ust be transparent
[wxWidgets.git] / samples / controls / controls.cpp
index 8e20cbb4063f3f05a398af0104a1b8a2fc4de4e7..bb6d0fea8adfc438b76eaf1cb11a530810020e39 100644 (file)
@@ -1276,6 +1276,13 @@ void MyPanel::OnUpdateShowProgress( wxUpdateUIEvent& event )
 void MyPanel::OnShowProgress( wxCommandEvent& WXUNUSED(event) )
 {
     int max = m_spinbutton->GetValue();
+    
+    if ( max <= 0 )
+    {
+        wxLogError(_T("You must set positive range!"));
+        return;
+    }
+    
     wxProgressDialog dialog("Progress dialog example",
                             "An informative message",
                             max,    // range