views:

68

answers:

2

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  A: 

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

Peter Hosey
Nice, I've never seen that one.
Rob Keniger
A: 

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.

SimpleMan