Questions tagged [nsmenu]

OS X API : A class that defines an object that manages an application’s menus

365 questions
-1
votes
1 answer

Display menu on NSTableView if a row is selected

I have a menu on the outlet of an NSTableView. It will show the menu when I right click on the Table View, but I don't want to show the menu if there is no row selected. How can I stop the menu from showing when I right click and there is no row…
Ryuuzaki Julio
  • 369
  • 1
  • 14
-1
votes
1 answer

Prevent NSPopUpButton to open its menu

I need to prevent the popup's menu to be opened when some conditions are met, so I implemented "willOpenMenu" to know when the menu is about to be opened: class MyPopUpButton: NSPopUpButton { override func willOpenMenu(_ menu: NSMenu, with…
Mike97
  • 596
  • 5
  • 20
-1
votes
1 answer

NSMenu is null when called from another class

I have NSMenu of a status bar app, defined in AppDelegate.h like this: IBOutlet NSMenu *spotMenu; @property (nonatomic, retain) IBOutlet NSMenu *spotMenu; And in AppDelegate.m like this: [spotApp setMenu: spotMenu]; - (NSMenu *)…
grep
  • 566
  • 5
  • 20
-2
votes
2 answers

Howto change from proportional to tabulated digits in menu items?

I want to change from proportional to tabulated digits in menu items? It's possible? Menu without tabulated digits
PhiGoLu
  • 21
  • 4
-3
votes
1 answer

NSMenu subclassing in Swift 4

What happens to be trivial task in Objective-C - (instancetype)initWithTitle:(NSString *)title { return [super initWithTitle:title]; //bool but_it_works_in_objective_c; } causes short-circuit errors with suggestions: only nil value…
3F71792A
  • 1
  • 1
1 2 3
24
25