2008 07 04Clickable Disabled MenuItems
- disabled : the default. You can't click it, you don't know why.
- active : click it and show an alert explaining why it can't be done.
- disabled + tooltip : a short delay hovering the disabled item will explain why it is disabled.
And the fourth option, that you all remember when trying to go fullscreen with Quicktime :
- active but greyed out : the menu item can be selected, clicked (it will then show an alert), and it looks disabled !
Let's launch F-Script and see how it's done :
NSMenuItem uses a default font and color, but you can customize it via
validateMenuItem:: always return
YES, and change the
NSMenuItemcolor when it should be disabled.