if ( !wxCheckBoxBase::Create(parent, id, pos, size, style, validator, name) )
return false;
m_labelOrig = m_label = label ;
WXValidateStyle( &style );
if ( !wxCheckBoxBase::Create(parent, id, pos, size, style, validator, name) )
return false;
m_labelOrig = m_label = label ;
WXValidateStyle( &style );
- m_peer = wxWidgetImpl::CreateCheckBox( this, parent, id, label, pos, size, style, GetExtraStyle() ) ;
+ SetPeer(wxWidgetImpl::CreateCheckBox( this, parent, id, label, pos, size, style, GetExtraStyle() )) ;
+ else
+ {
+ // in case we cannot avoid this user state change natively (eg cocoa) we intercept it here
+ if ( newState == wxCHK_UNDETERMINED && !Is3rdStateAllowedForUser() )
+ {
+ newState = wxCHK_CHECKED;
+ Set3StateValue( newState );
+ }
+ }
+