use ChangeValue instead of SetValue to avoid bogus EVT_TEXT events

when just setting the descriptive text.
(ported from 2.8 branch)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-02-06 21:14:42 +00:00
parent 4f767c1e8f
commit b5dc8fdbfd

View File

@@ -123,7 +123,7 @@ public:
{
if ( GetValue() == m_descriptiveText )
{
SetValue(wxEmptyString);
ChangeValue(wxEmptyString);
}
m_descriptiveText = text;
@@ -163,7 +163,7 @@ protected:
{
if ( IsEmpty() && !(wxWindow::FindFocus() == this) )
{
SetValue(m_descriptiveText);
ChangeValue(m_descriptiveText);
SetInsertionPoint(0);
SetForegroundColour(wxStepColour(m_defaultFG, LIGHT_STEP));
}
@@ -174,7 +174,7 @@ protected:
event.Skip();
if ( GetValue() == m_descriptiveText )
{
SetValue(wxEmptyString);
ChangeValue(wxEmptyString);
SetForegroundColour(m_defaultFG);
}
}