setBackgroundColor:
テキストフィールドセルの背景色をセットします
-(void)setBackgroundColor:(NSColor *)aColor:
解説
テキストフィールドセルの背景色をセットします。
返り値
( void )
なし
引数
( NSColor * )aColor
背景色
フレームワーク
ApplicationKit
クラス
NSTextFieldCell
Instance Methods
使用可能
10.0
参照
- setDrawsBackground:
- setBackgroundColor:(NSTextField)
-backgroundColor
例文
#import "scriptSend.h" @implementation scriptSend - (IBAction)myAction:(id)sender { //myOutletはtextfieldcell [myOutlet setBackgroundColor: [NSColor redColor]]; [myOutlet setDoubleValue: [[myOutlet backgroundColor] redComponent]]; //レシーバ背景色のredの値を表示する(0から1でredColorのredの値は1) } @end