diff --git a/src/osx/cocoa/button.mm b/src/osx/cocoa/button.mm index acdef2fb56..7cf73211aa 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]; }