From: Robin Dunn Date: Sun, 21 Jan 2007 06:47:33 +0000 (+0000) Subject: Return an empty string from GetValue if the textctrl is set to the X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4aab34290a0c966bffc9e529dae5666b5db77c96 Return an empty string from GetValue if the textctrl is set to the descriptive text git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/srchctlg.cpp b/src/generic/srchctlg.cpp index b40557a724..75f9391892 100644 --- a/src/generic/srchctlg.cpp +++ b/src/generic/srchctlg.cpp @@ -534,7 +534,11 @@ void wxSearchCtrl::LayoutControls(int x, int y, int width, int height) wxString wxSearchCtrl::GetValue() const { - return m_text->GetValue(); + wxString value = m_text->GetValue(); + if (value == m_text->GetDescriptiveText()) + return wxEmptyString; + else + return value; } void wxSearchCtrl::SetValue(const wxString& value) {