setImage:
画像をセットする。
-(void)setImage:(NSImage *)anImage:
解説
画像をセットするメソッドですが、メニュー項目のトップの画像が使用されるので、効果はない。
返り値
( void )
なし
引数
( NSImage * )anImage
フレームワーク
ApplicationKit
クラス
NSPopUpButtonCell
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { [[popupbutton cell] setPullsDown:YES]; ([[popupbutton cell] pullsDown])? NSLog(@"YES") : NSLog(@"NO"); [[[[popupbutton cell] menu] itemAtIndex:0] setImage:[NSImage imageNamed:@"NSApplicationIcon"]]; } @end