diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index 08473b57f0..e41451d8c8 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -332,15 +332,6 @@ wxPG_EX_TOOLBAR_SEPARATOR = 0x10000000 // ----------------------------------------------------------------------- -// -// Ids for sub-controls -// NB: It should not matter what these are. -#define wxPG_SUBID1 2 -#define wxPG_SUBID2 3 -#define wxPG_SUBID_TEMP1 4 - -// ----------------------------------------------------------------------- - /** @class wxPGCommonValue wxPropertyGrid stores information about common values in these diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index 9cabc83788..79707f3de4 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -271,7 +271,7 @@ wxPGWindowList wxPGSpinCtrlEditor::CreateControls( wxPropertyGrid* propgrid, wxP #ifdef __WXMSW__ wnd2->Hide(); #endif - wnd2->Create( propgrid->GetPanel(), wxPG_SUBID2, butPos, butSz, wxSP_VERTICAL ); + wnd2->Create( propgrid->GetPanel(), wxID_ANY, butPos, butSz, wxSP_VERTICAL ); wnd2->SetRange( INT_MIN, INT_MAX ); wnd2->SetValue( 0 ); @@ -487,7 +487,7 @@ wxPGWindowList wxPGDatePickerCtrlEditor::CreateControls( wxPropertyGrid* propgri dateValue = value.GetDateTime(); ctrl->Create(propgrid->GetPanel(), - wxPG_SUBID1, + wxID_ANY, dateValue, pos, useSz, diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 94bdce237d..584860a953 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -1039,7 +1039,7 @@ wxWindow* wxPGChoiceEditor::CreateControlsBase( wxPropertyGrid* propGrid, cb->Hide(); #endif cb->Create(ctrlParent, - wxPG_SUBID1, + wxID_ANY, wxString(), po, si, @@ -1599,7 +1599,7 @@ wxPGWindowList wxPGCheckBoxEditor::CreateControls( wxPropertyGrid* propGrid, sz.x = propGrid->GetFontHeight() + (wxPG_XBEFOREWIDGET*2) + 4; wxSimpleCheckBox* cb = new wxSimpleCheckBox(propGrid->GetPanel(), - wxPG_SUBID1, pt, sz); + wxID_ANY, pt, sz); cb->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); @@ -1865,7 +1865,6 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrl( const wxPoint& pos, int maxLen, unsigned int forColumn ) { - wxWindowID id = wxPG_SUBID1; wxPGProperty* prop = GetSelection(); wxASSERT(prop); @@ -1910,7 +1909,7 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrl( const wxPoint& pos, tc->Hide(); #endif SetupTextCtrlValue(value); - tc->Create(ctrlParent,id,value, p, s,tcFlags); + tc->Create(ctrlParent,wxID_ANY,value, p, s,tcFlags); #if defined(__WXMSW__) // On Windows, we need to override read-only text ctrl's background @@ -1968,7 +1967,6 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrl( const wxPoint& pos, wxWindow* wxPropertyGrid::GenerateEditorButton( const wxPoint& pos, const wxSize& sz ) { - wxWindowID id = wxPG_SUBID2; wxPGProperty* selected = GetSelection(); wxASSERT(selected); @@ -1981,7 +1979,7 @@ wxWindow* wxPropertyGrid::GenerateEditorButton( const wxPoint& pos, const wxSize wxSize s(25, -1); wxButton* but = new wxButton(); - but->Create(GetPanel(),id,wxS("..."),p,s,wxWANTS_CHARS); + but->Create(GetPanel(),wxID_ANY,wxS("..."),p,s,wxWANTS_CHARS); // Now that we know the size, move to the correct position p.x = pos.x + sz.x - but->GetSize().x - 2; @@ -2008,7 +2006,7 @@ wxWindow* wxPropertyGrid::GenerateEditorButton( const wxPoint& pos, const wxSize #ifdef __WXMSW__ but->Hide(); #endif - but->Create(GetPanel(),id,wxS("..."),p,s,wxWANTS_CHARS); + but->Create(GetPanel(),wxID_ANY,wxS("..."),p,s,wxWANTS_CHARS); #ifdef __WXGTK__ wxFont font = GetFont(); @@ -2135,7 +2133,7 @@ bool wxPGEditorDialogAdapter::ShowDialog( wxPropertyGrid* propGrid, wxPGProperty // ----------------------------------------------------------------------- wxPGMultiButton::wxPGMultiButton( wxPropertyGrid* pg, const wxSize& sz ) - : wxWindow( pg->GetPanel(), wxPG_SUBID2, wxPoint(-100,-100), wxSize(0, sz.y) ), + : wxWindow( pg->GetPanel(), wxID_ANY, wxPoint(-100,-100), wxSize(0, sz.y) ), m_fullEditorSize(sz), m_buttonsWidth(0) { SetBackgroundColour(pg->GetCellBackgroundColour()); @@ -2151,10 +2149,7 @@ int wxPGMultiButton::GenId( int itemid ) const { if ( itemid < -1 ) { - if ( m_buttons.size() ) - itemid = GetButton(m_buttons.size()-1)->GetId() + 1; - else - itemid = wxPG_SUBID2; + itemid = wxID_ANY; } return itemid; } diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 9fe5672877..fef32b9bc3 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -2181,7 +2181,7 @@ bool wxLongStringProperty::DisplayEditorDialog( wxPGProperty* prop, wxPropertyGr long edStyle = wxTE_MULTILINE; if ( prop->HasFlag(wxPG_PROP_READONLY) ) edStyle |= wxTE_READONLY; - wxTextCtrl* ed = new wxTextCtrl(dlg,11,value, + wxTextCtrl* ed = new wxTextCtrl(dlg,wxID_ANY,value, wxDefaultPosition,wxDefaultSize,edStyle); rowsizer->Add( ed, 1, wxEXPAND|wxALL, spacing ); @@ -2870,7 +2870,7 @@ bool wxPGInDialogValidator::DoValidate( wxPropertyGrid* propGrid, if ( !tc ) { { - tc = new wxTextCtrl( propGrid, wxPG_SUBID_TEMP1, wxEmptyString, + tc = new wxTextCtrl( propGrid, wxID_ANY, wxEmptyString, wxPoint(30000,30000)); tc->Hide(); }