Question

What customization options are there for Cocoas NSFontPanel?

The NSFontPanel accessible in iWork Pages has "Text Underline", "Text Strikethrough" and "Document Color" controls at the top. We don't want these in our NSFontPanel. Is there any way to remove or disable these controls?

Was it helpful?

Solution

Implement the NSFontPanelValidation protocol in the relevant responder(s).

OTHER TIPS

Like you said, the responder must implement the NSFontPanelValidation protocol and override the - (NSUInteger)validModesForFontPanel:(NSFontPanel *)fontPanel method. But this method does not invoked when the NSFontPanel showed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top