diff --git a/include/wx/generic/srchctlg.h b/include/wx/generic/srchctlg.h index 67d0c99ca2..188a92aa2e 100644 --- a/include/wx/generic/srchctlg.h +++ b/include/wx/generic/srchctlg.h @@ -88,6 +88,8 @@ public: // operations // ---------- + virtual void ChangeValue(const wxString& value) wxOVERRIDE; + // editing virtual void Clear() wxOVERRIDE; virtual void Replace(long from, long to, const wxString& value) wxOVERRIDE; diff --git a/src/generic/srchctlg.cpp b/src/generic/srchctlg.cpp index 01acd68ea9..93b2321b05 100644 --- a/src/generic/srchctlg.cpp +++ b/src/generic/srchctlg.cpp @@ -915,6 +915,14 @@ wxTextCtrl& operator<<(double d); wxTextCtrl& operator<<(const wxChar c); #endif +// Note that overriding DoSetValue() is currently insufficient because the base +// class ChangeValue() only updates m_hintData of this object (which is null +// anyhow), instead of updating m_text->m_hintData, see #16998. +void wxSearchCtrl::ChangeValue(const wxString& value) +{ + m_text->ChangeValue(value); +} + void wxSearchCtrl::DoSetValue(const wxString& value, int flags) { m_text->DoSetValue(value, flags);