setDrawsBackground:
テキストフィールドセルの背景を描くかセットします
-(void)setDrawsBackground:(BOOL)flag:
解説
テキストフィールドセルの背景を描くかセットします。
YESをセットすると背景を描きます。
NOをセットすると背景を描きません。
返り値
( void )
なし
引数
( BOOL )flag
描画するかYES/NO
フレームワーク
ApplicationKit
クラス
NSTextFieldCell
Instance Methods
使用可能
10.0
参照
- setBackgroundColor:
- setDrawsBackground:(NSTextField)
-drawsBackground
例文
#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) } @end