Hoang Anh Tuan
Hoang Anh Tuan

Reputation: 420

How to make NSButton of NSAlert crops the text?

My NSAlert has 2 buttons. I changed the font of a button but its frame doesn't auto-resize to crops its text.
I have tried changing the frame of the button, use sizeToFits, set attribute title, ... but it didn't work.
How can I make the button to crops the text? Is it possible? Thanks.

Here is a screenshot of the button:

button screenshot

I use this code to change the button's font:

alert.buttons[0].font = NSFont.systemFont(ofSize: 25.5)

Upvotes: 0

Views: 143

Answers (0)

Related Questions