setSelectedTextAttributes:
選択する文字の属性をセットします
-(void)setSelectedTextAttributes:(NSDictionary *)attributes:
解説
選択している文字の属性をセットします。
描画色、背景色、アンダーラインがサポートする属性です。
返り値
( void )
なし
引数
( NSDictionary * )attributes
文字属性
フレームワーク
ApplicationKit
クラス
NSTextView
Instance Methods
使用可能
10.0
参照
- selectedRange (NSTextInput)
- selectedTextAttributes
例文
[textView setSelectedTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[NSColor selectedControlTextColor], NSForegroundColorAttributeName, [NSColor selectedTextBackgroundColor], NSBackgroundColorAttributeName, nil]];