From 58f43b41b1060e26c1c5903b7d917e19bb73dc29 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Sun, 5 Oct 2008 14:23:28 +0000 Subject: [PATCH] Use wxPGEditor_X instead of wxPGEditor(X), as in new docs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/propgrid/propgrid.cpp | 12 ++++++------ samples/propgrid/tests.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/propgrid/propgrid.cpp b/samples/propgrid/propgrid.cpp index aa8d738b00..c2f22855e1 100644 --- a/samples/propgrid/propgrid.cpp +++ b/samples/propgrid/propgrid.cpp @@ -609,7 +609,7 @@ public: // Set editor to have button virtual const wxPGEditor* DoGetEditorClass() const { - return wxPG_EDITOR(TextCtrlAndButton); + return wxPGEditor_TextCtrlAndButton; } // Set what happens on button click @@ -1368,7 +1368,7 @@ void FormMain::PopulateWithExamples () #if wxUSE_SPINBTN pg->Append( new wxIntProperty ( wxT("SpinCtrl"), wxPG_LABEL, 0 ) ); - pg->SetPropertyEditor( wxT("SpinCtrl"), wxPG_EDITOR(SpinCtrl) ); + 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"), wxT("Step"), (long)2 ); @@ -1376,7 +1376,7 @@ void FormMain::PopulateWithExamples () pg->SetPropertyHelpString( wxT("SpinCtrl"), wxT("This is regular wxIntProperty, which editor has been ") - wxT("changed to wxPG_EDITOR(SpinCtrl). Note however that ") + wxT("changed to wxPGEditor_SpinCtrl. Note however that ") wxT("static wxPropertyGrid::RegisterAdditionalEditors() ") wxT("needs to be called prior to using it.")); @@ -1437,11 +1437,11 @@ 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"), wxPG_EDITOR(ComboBox) ); + pg->SetPropertyEditor( wxT("ColourProperty"), wxPGEditor_ComboBox ); pg->GetProperty(wxT("ColourProperty"))->SetFlag(wxPG_PROP_AUTO_UNSPECIFIED); pg->SetPropertyHelpString( wxT("ColourProperty"), wxT("wxPropertyGrid::SetPropertyEditor method has been used to change ") - wxT("editor of this property to wxPG_EDITOR(ComboBox)")); + wxT("editor of this property to wxPGEditor_ComboBox)")); // // This demonstrates using alternative editor for colour property @@ -2616,7 +2616,7 @@ void FormMain::OnSetSpinCtrlEditorClick( wxCommandEvent& WXUNUSED(event) ) #if wxUSE_SPINBTN wxPGProperty* pgId = m_pPropGridManager->GetSelection(); if ( pgId ) - m_pPropGridManager->SetPropertyEditor( pgId, wxPG_EDITOR(SpinCtrl) ); + m_pPropGridManager->SetPropertyEditor( pgId, wxPGEditor_SpinCtrl ); else wxMessageBox(wxT("First select a property")); #endif diff --git a/samples/propgrid/tests.cpp b/samples/propgrid/tests.cpp index eadab63b53..7dfc121822 100644 --- a/samples/propgrid/tests.cpp +++ b/samples/propgrid/tests.cpp @@ -238,7 +238,7 @@ void FormMain::AddTestProperties( wxPropertyGridPage* pg ) pg->Append( new MyColourProperty3(wxT("CustomColourProperty3"), wxPG_LABEL, *wxGREEN) ); pg->GetProperty(wxT("CustomColourProperty3"))->SetFlag(wxPG_PROP_AUTO_UNSPECIFIED); - pg->SetPropertyEditor( wxT("CustomColourProperty3"), wxPG_EDITOR(ComboBox) ); + pg->SetPropertyEditor( wxT("CustomColourProperty3"), wxPGEditor_ComboBox ); pg->SetPropertyHelpString(wxT("CustomColourProperty3"), wxT("This is a MyColourProperty3 from the sample app. ") -- 2.45.2