added wxTextCtrl::ChangeValue() which is the same as SetValue() but doesn't send the text changed event (first part of patch 1553551)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-10-08 17:46:12 +00:00
parent 1d6fcbcc70
commit f6519b40fe
24 changed files with 191 additions and 45 deletions

View File

@@ -125,6 +125,7 @@ bool wxTextCtrl::Create(
m_windowStyle = lStyle;
m_bIsMLE = false;
m_bSkipUpdate = false;
long lSstyle = WS_VISIBLE | WS_TABSTOP;
@@ -343,8 +344,9 @@ wxString wxTextCtrl::GetValue() const
return sStr;
} // end of wxTextCtrl::GetValue
void wxTextCtrl::SetValue(
const wxString& rsValue
void wxTextCtrl::DoSetValue(
const wxString& rsValue,
int flags
)
{
//
@@ -355,6 +357,9 @@ void wxTextCtrl::SetValue(
//
if ((rsValue.length() > 0x400) || (rsValue != GetValue()))
{
if ( flags & SetValue_SendEvent )
m_bSkipUpdate = true;
::WinSetWindowText(GetHwnd(), (PSZ)rsValue.c_str());
AdjustSpaceLimit();
}
@@ -1095,6 +1100,12 @@ bool wxTextCtrl::OS2Command(
case EN_CHANGE:
{
if (m_bSkipUpdate)
{
m_bSkipUpdate = false;
break;
}
wxCommandEvent vEvent( wxEVT_COMMAND_TEXT_UPDATED
,m_windowId
);