allowing the suppression of SetValue event-triggering (needed for composite controls)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -435,6 +435,7 @@ void wxTextCtrl::Init()
|
||||
|
||||
m_maxLength = 0;
|
||||
m_privateContextMenu = NULL;
|
||||
m_triggerOnSetValue = true ;
|
||||
}
|
||||
|
||||
wxTextCtrl::~wxTextCtrl()
|
||||
@@ -545,10 +546,13 @@ void wxTextCtrl::SetValue(const wxString& str)
|
||||
|
||||
GetPeer()->SetStringValue( str ) ;
|
||||
|
||||
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, m_windowId );
|
||||
event.SetString( GetValue() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
if ( m_triggerOnSetValue )
|
||||
{
|
||||
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, m_windowId );
|
||||
event.SetString( GetValue() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
void wxTextCtrl::SetMaxLength(unsigned long len)
|
||||
|
Reference in New Issue
Block a user