+void wxGridCellTextEditor::SetValidator(const wxValidator& validator)
+{
+ m_validator.reset(static_cast<wxValidator*>(validator.Clone()));
+}
+
+wxGridCellEditor *wxGridCellTextEditor::Clone() const
+{
+ wxGridCellTextEditor* editor = new wxGridCellTextEditor(m_maxChars);
+ if ( m_validator )
+ {
+ editor->SetValidator(*m_validator);
+ }
+ return editor;
+}
+