Make NSButton Open Font Panel

I was wondering how to make a button open the font panel in Mac OS X using Cocoa, I have an NSTextView in my application and you want the font dialog to display when the user clicks the button. Thanks in advance!

+6
source share
1 answer

The last object that appears by default (the one that you see to the left of the editing area) is Font Manager. All you have to do is control the drag and drop from your button to the font manager and orderFrontFontPanel: action.

+4
source

Source: https://habr.com/ru/post/894139/


All Articles