]> git.saurik.com Git - wxWidgets.git/commitdiff
Return an empty string from GetValue if the textctrl is set to the
authorRobin Dunn <robin@alldunn.com>
Sun, 21 Jan 2007 06:47:33 +0000 (06:47 +0000)
committerRobin Dunn <robin@alldunn.com>
Sun, 21 Jan 2007 06:47:33 +0000 (06:47 +0000)
descriptive text

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/srchctlg.cpp

index b40557a72458fcbb1aed01a1e99be63a7a8ebfbb..75f939189239593dfd3f4f5be92026e6eff2a59e 100644 (file)
@@ -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)
 {