git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38621
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxMacTextControl * GetPeer() const
{ return (wxMacTextControl*) m_peer; }
wxMacTextControl * GetPeer() const
{ return (wxMacTextControl*) m_peer; }
protected:
// common part of all ctors
void Init();
protected:
// common part of all ctors
void Init();
// need to make this public because of the current implementation via callbacks
unsigned long m_maxLength;
// need to make this public because of the current implementation via callbacks
unsigned long m_maxLength;
+
+ bool GetTriggerOnSetValue() const
+ {
+ return m_triggerOnSetValue;
+ }
+
+ void SetTriggerOnSetValue(bool trigger)
+ {
+ m_triggerOnSetValue = trigger;
+ }
+
+ bool m_triggerOnSetValue ;
private :
wxMenu *m_privateContextMenu;
private :
wxMenu *m_privateContextMenu;
: wxTextCtrl( cb , 1 )
{
m_cb = cb;
: wxTextCtrl( cb , 1 )
{
m_cb = cb;
+ SetTriggerOnSetValue( false );
m_maxLength = 0;
m_privateContextMenu = NULL;
m_maxLength = 0;
m_privateContextMenu = NULL;
+ m_triggerOnSetValue = true ;
}
wxTextCtrl::~wxTextCtrl()
}
wxTextCtrl::~wxTextCtrl()
GetPeer()->SetStringValue( 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)
}
void wxTextCtrl::SetMaxLength(unsigned long len)