Invoked to let the delegate update a menu item before it is displayed.
Original signature is '- (BOOL)menu:(NSMenu *)menu updateItem:(NSMenuItem *)item atIndex:(NSInteger)index shouldCancel:(BOOL)shouldCancel'
Available in Mac OS X v10.3 and later.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public event NSMenu..::..MenuUpdateItemAtIndexShouldCancelEventHandler MenuUpdateItemAtIndexShouldCancel
Public Event MenuUpdateItemAtIndexShouldCancel As NSMenu..::..MenuUpdateItemAtIndexShouldCancelEventHandler
public: event NSMenu..::..MenuUpdateItemAtIndexShouldCancelEventHandler^ MenuUpdateItemAtIndexShouldCancel { void add (NSMenu..::..MenuUpdateItemAtIndexShouldCancelEventHandler^ value); void remove (NSMenu..::..MenuUpdateItemAtIndexShouldCancelEventHandler^ value); }
Return Value
YES to continue the process. If you return NO, your menu:updateItem:atIndex:shouldCancel: is not called again. In that case, it is your responsibility to trim any extra items from the menu.
Version Information
- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)