From 4aab34290a0c966bffc9e529dae5666b5db77c96 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sun, 21 Jan 2007 06:47:33 +0000 Subject: [PATCH] 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 --- src/generic/srchctlg.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) {