]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/propgrid/propgrid.cpp
fix the MSVC check in the last comment and accompanying comment
[wxWidgets.git] / samples / propgrid / propgrid.cpp
index e8e320529fbc8803ad6b05dad649bfadff7936ce..31c148387887ed217ebbd34ab9065dd62991a867 100644 (file)
@@ -1369,8 +1369,9 @@ void FormMain::PopulateWithExamples ()
 
     pg->SetPropertyEditor( wxT("SpinCtrl"), wxPGEditor_SpinCtrl );
     pg->SetPropertyAttribute( wxT("SpinCtrl"), wxPG_ATTR_MIN, (long)-10 );  // Use constants instead of string
-    pg->SetPropertyAttribute( wxT("SpinCtrl"), wxPG_ATTR_MAX, (long)10 );   // for reduced binary size.
+    pg->SetPropertyAttribute( wxT("SpinCtrl"), wxPG_ATTR_MAX, (long)16384 );   // for reduced binary size.
     pg->SetPropertyAttribute( wxT("SpinCtrl"), wxT("Step"), (long)2 );
+    pg->SetPropertyAttribute( wxT("SpinCtrl"), wxT("MotionSpin"), true );
     //pg->SetPropertyAttribute( wxT("SpinCtrl"), wxT("Wrap"), true );
 
     pg->SetPropertyHelpString( wxT("SpinCtrl"),
@@ -1659,6 +1660,10 @@ void FormMain::PopulateWithExamples ()
                                             wxPG_LABEL,
                                             300000) );
 
+    pg->AppendIn(carProp, new wxBoolProperty(wxT("Convertible"),
+                                             wxPG_LABEL,
+                                             false) );
+
     // Displayed value of "Car" property is now very close to this:
     // "Lamborghini Diablo SV; 5707 [300; 3.9; 8.6] 300000"
 
@@ -3046,6 +3051,7 @@ void FormMain::OnMisc ( wxCommandEvent& event )
         if ( prop )
         {
             m_pPropGridManager->SetPropertyValueUnspecified(prop);
+            prop->RefreshEditor();
         }
     }
 }