menuForEvent:inRect:ofView:
メニューを表示させるときに呼び出されますサブクラスでオーバーライドします
-(NSMenu *)menuForEvent:(NSEvent *)anEvent:
inRect:(NSRect)cellFrame:
ofView:(NSView *)aView:
解説
メニューを表示させるときに呼び出されます。サブクラスでオーバーライドします。
返り値
( NSMenu * )
メニュー
引数
( NSEvent * )anEvent
イベント
( NSRect )cellFrame
範囲
( NSView * )aView
ビュー
フレームワーク
ApplicationKit
クラス
NSCell
Instance Methods
使用可能
10.0
参照
例文
#import "MyButtonCell.h" @implementation MyButtonCell -(NSMenu *)menuForEvent:(NSEvent *)anEvent inRect:(NSRect)cellFrame ofView:(NSView *)aView { NSLog(@"!!!"); return nil; } @end