Reputation: 129
I have a NSBox with some labels inside it, that I want to act as a button. Is this possible, or do I have to find some other way to make large areas of an application clickable?
Upvotes: 3
Views: 471
Reputation: 31
Yes, use the func mouseDown event. You can also do this based on location. Also, if you’re working with the sks file you can always create a transparent button on top (assuming the box with labels is stationary)...
Upvotes: 1
Reputation: 1040
As a subclass of NSView
, NSBox
responds to the mouseDown
event. More information at https://developer.apple.com/documentation/appkit/nsresponder/1524634-mousedown
Upvotes: 2