In Xcode, there is an 'In My Scope' button which highlights when you mouse over and stays highlighted until its 'unclicked'.
I can reproduce this via interface builder with the following:
But I can't get this working via Code. This is what I've come up with:
scopeButton = [NSButton buttonWithTitle: @"In My Scope"
target: self
action: @selector(onScopeButton:)];
[scopeButton setButtonType: NSButtonTypeMomentaryLight];
scopeButton.translatesAutoresizingMaskIntoConstraints = NO;
scopeButton.bezelStyle = NSBezelStyleRecessed;
scopeButton.bordered = YES;
And as far as I can tell, that matches the interface builder settings, but it works no where near the same. Any suggestions as to how I can get this to work via code?
Replace
scopeButton.bordered = YES;
by
scopeButton.showsBorderOnlyWhileMouseInside = YES;