drawInsertionPointInRect:color:turnedOn:
挿入ポイントを描くかを返します
-(void)drawInsertionPointInRect:(NSRect)aRect: color:(NSColor *)aColor: turnedOn:(BOOL)flag:
解説
挿入ポイントを描くかを返します。
flagがYESならaColorを使ってaRectで挿入位置を描きます。
flagがNOなら描きません。
このメソッドを呼び出すときにはテキストビューにフォーカスがロックされていないといけません。
返り値
( void )
なし
引数
( NSRect )aRect
範囲
( NSColor * )aColor
色
( BOOL )flag
フレームワーク
ApplicationKit
クラス
NSTextView
Instance Methods
使用可能
10.0
参照
- insertionPointColor
- shouldDrawInsertionPoint
- backgroundColor
- lockFocus (NSView)
例文
NSColor *theColor = [NSColor colorWithDeviceRed:1 green:0.3 blue:0.8 alpha:1];//カラー作成 if ([myOutlet shouldDrawInsertionPoint]){ [myOutlet lockFocus]; [myOutlet drawInsertionPointInRect:NSMakeRect(20,20,50,10) color:theColor turnedOn:YES ]; [myOutlet unlockFocus]; }else{ [myOutlet insertText:@"NO"]; }