X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec88eb712ebf8c2cc37a3cc1dcc864d37578d958..be82fa69894de6a44094e8f9fdceed610fcb3dc3:/samples/propgrid/propgrid.cpp diff --git a/samples/propgrid/propgrid.cpp b/samples/propgrid/propgrid.cpp index a4fe375cc0..b81ea3cc3e 100644 --- a/samples/propgrid/propgrid.cpp +++ b/samples/propgrid/propgrid.cpp @@ -1471,9 +1471,10 @@ void FormMain::PopulateWithExamples () pg->SetPropertyHelpString( wxT("BoolProperty with CheckBox"), wxT("Property attribute wxPG_BOOL_USE_CHECKBOX has been set to true.") ); - pid = pg->Append( new wxFloatProperty( wxT("FloatProperty"), - wxPG_LABEL, - 1234500.23 ) ); + prop = pg->Append( new wxFloatProperty("FloatProperty", + wxPG_LABEL, + 1234500.23) ); + prop->SetAttribute("Min", -100.12); // A string property that can be edited in a separate editor dialog. pg->Append( new wxLongStringProperty( wxT("LongStringProperty"), wxT("LongStringProp"), @@ -1515,7 +1516,7 @@ void FormMain::PopulateWithExamples () pid = pg->Append( new wxColourProperty(wxT("ColourProperty"),wxPG_LABEL,*wxRED) ); //pg->SetPropertyAttribute(pid,wxPG_COLOUR_ALLOW_CUSTOM,false); pg->SetPropertyEditor( wxT("ColourProperty"), wxPGEditor_ComboBox ); - pg->GetProperty(wxT("ColourProperty"))->SetFlag(wxPG_PROP_AUTO_UNSPECIFIED); + pg->GetProperty(wxT("ColourProperty"))->SetAutoUnspecified(true); pg->SetPropertyHelpString( wxT("ColourProperty"), wxT("wxPropertyGrid::SetPropertyEditor method has been used to change ") wxT("editor of this property to wxPGEditor_ComboBox)"));