diff --git a/src/osx/cocoa/button.mm b/src/osx/cocoa/button.mm index 35c2c4d941..d10797440e 100644 --- a/src/osx/cocoa/button.mm +++ b/src/osx/cocoa/button.mm @@ -127,11 +127,13 @@ void wxButtonCocoaImpl::SetPressedBitmap( const wxBitmap& bitmap ) { NSButton* button = GetNSButton(); [button setAlternateImage: bitmap.GetNSImage()]; +#if wxUSE_TOGGLEBTN if ( GetWXPeer()->IsKindOf(wxCLASSINFO(wxToggleButton)) ) { [button setButtonType:NSToggleButton]; } else +#endif { [button setButtonType:NSMomentaryChangeButton]; }