I am Trying to Create a NSComboBox like the image attached with the list of Fonts. Any body knows and custom special control is available.
Like create a Font Menu as in Microsoft Word in my Mac OSX Cocoa Application
234 views Asked by user226372 At
2
I see you're new to SO. You say "I'm trying to create", what have you tried? In general on SO you should show what you've attempted, what did not work, what piece of information eluded you, etc.
Here's some information to get you started:
NSComboBox
justs takes "objects" and says it will display "common value classes" (ref). Have you triedNSAttributedString
?NSFontManager
has a methodavailableFonts
You can use those to quickly produce a menu of styled font names, it probably won't be what you want but it will be a start.
Note that on a Mac the recommended ways to select fonts are standard Font menus and the Font Panel (
NSFontPanel
), do you really want to mimic a Windows UI for a Mac app?HTH