wxMacTextControl * GetPeer() const
{ return (wxMacTextControl*) m_peer; }
-
+
protected:
// common part of all ctors
void Init();
// 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;
m_maxLength = 0;
m_privateContextMenu = NULL;
+ m_triggerOnSetValue = true ;
}
wxTextCtrl::~wxTextCtrl()
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)