6

I have an NSStatusItem that displays an NSMenu full of NSView subclasses. I override drawRect: in my NSView subclass to implement highlighting in the NSMenu and everything works fine in the root menu, but for some reason it doesn't work in submenus of the root menu. I put some NSLog statements in my NSView subclasses drawRect: and noticed that it's not even being called for the views in the submenu. Any ideas?

I can post the code that I'm using to highlight the views, but I don't think that its necessary since drawRect: is not even being called. Let me know if there's any other code you need to see that might help.

edc1591
  • 10,146
  • 6
  • 40
  • 63

2 Answers2

0

Could you use NSMenuItem's setEnabled method to sort of jog the submenuItems awake?

Wienke
  • 3,723
  • 27
  • 40
0

The problem seems to have resolved itself. I might have just forgot to set the view to use my NSView subclass.

edc1591
  • 10,146
  • 6
  • 40
  • 63