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