diff --git a/interface/wx/grid.h b/interface/wx/grid.h index 81a372cff3..ffba02af79 100644 --- a/interface/wx/grid.h +++ b/interface/wx/grid.h @@ -693,7 +693,11 @@ public: bool allowOthers = false); /** - Parameters string format is "item1[,item2[...,itemN]]" + Parameters string format is "item1[,item2[...,itemN]]". + + This method can be called before the editor is used for the first time, + or later, in which case it replaces the previously specified strings + with the new ones. */ virtual void SetParameters(const wxString& params); }; diff --git a/src/generic/grideditors.cpp b/src/generic/grideditors.cpp index 3fb11821ea..9ac3da7786 100644 --- a/src/generic/grideditors.cpp +++ b/src/generic/grideditors.cpp @@ -1574,6 +1574,12 @@ void wxGridCellChoiceEditor::SetParameters(const wxString& params) { m_choices.Add(tk.GetNextToken()); } + + if ( m_control ) + { + Combo()->Set(m_choices); + } + //else: m_choices will be used when creating it } // return the value in the text control