Reputation: 35
I've got an NSButton as a checkbox, and I'd like to set the inset to the title label.
Any ideas? In iOS, it can be set via the IB, in OSX apparently not.
Upvotes: 1
Views: 1133
Reputation: 1180
Sadly there is nothing in IB for that. So you should do it in the code:
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.firstLineHeadIndent = 20.0
checkButton.attributedTitle = NSAttributedString(string: checkButton.title, attributes: [NSParagraphStyleAttributeName : paragraphStyle])
Here is how it looks then:
Upvotes: 5