开发者

Give a Key equivalent to NSButton dynamically

开发者 https://www.devze.com 2023-03-09 02:19 出处:网络
I want to a开发者_JS百科ssign a key equivalent to an NSButton if the control is the first responder. You can override becomeFirstResponder: and in your implementation call setKeyEquivalent:. If you wa

I want to a开发者_JS百科ssign a key equivalent to an NSButton if the control is the first responder.


You can override becomeFirstResponder: and in your implementation call setKeyEquivalent:. If you want to remove the key equivalent when the button loses first responder status, override resignFirstResponder:.

0

精彩评论

暂无评论...
验证码 换一张
取 消