Instance Method

setKeyEquivalentFont(_:size:)

Sets by name and size of the font used to draw the key equivalent.

Declaration

func setKeyEquivalentFont(_ fontName: String, size fontSize: CGFloat)

Parameters

fontName

The name of the font to use to draw the key equivalent.

fontSize

The font size to use to draw the key equivalent.

Discussion

This method redisplays the button if necessary. It does nothing if the button doesn’t have a key equivalent associated with it. The default font is the same as that used to draw the title.

See Also

Managing the Key Equivalent

var keyEquivalent: String

The button’s key-equivalent character.

var keyEquivalentFont: NSFont?

The font used to draw the button’s key equivalent.

Deprecated
var keyEquivalentModifierMask: NSEvent.ModifierFlags

The mask that identifies the modifier keys for the button's key equivalent.