Customizing Cocoas NSFontPanel

749 views Asked by At

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?

2

There are 2 answers

2
Peter Hosey On BEST ANSWER

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

0
SimpleMan On

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.