setDrawsBackground:
テキストビューが背景を描画するかセットします
-(void)setDrawsBackground:(BOOL)flag:
解説
テキストビューが背景を描画するかセットします
flagがYESなら背景は背景色で塗ります。
flagはNOなら背景は塗りません。
返り値
( void )
なし
引数
( BOOL )flag
YES/NO
フレームワーク
ApplicationKit
クラス
NSTextView
Instance Methods
使用可能
10.0
参照
- setBackgroundColor:
- drawsBackground
例文
NSColor *theColor = [NSColor colorWithDeviceRed:1 green:0.3 blue:0.8 alpha:1];//カラー作成 [myOutlet setDrawsBackground:NO]; [myOutlet setBackgroundColor:theColor]; [myOutlet insertText:[NSString stringWithFormat:@"RedValue=%.1f",[[myOutlet backgroundColor] redComponent]]];