行の列を選択するとオーバーライドされたメソッドが呼び出されるテーブルビューがあります
- (void)selectWithFrame:(NSRect)inCellFrame inView:(NSView *)inControlView editor:(NSText *)textObj delegate:(id)anObject start:(NSInteger)selStart length:(NSInteger)selLength {
// here do some text positioning
[super selectWithFrame:inCellFrame inView:inControlView editor:textObj delegate:anObject start:selStart length:selLength];
}
また、セルのフィールド エディターを次のように返します。
- (NSTextView *)fieldEditorForView:(NSView *)inControlView {
MYTextView* fieldEditor = [[[MYTextView alloc] initWithFrame:NSZeroRect] autorelease];
return fieldEditor;
}
セルが選択されると、セル内のテキストの属性が変更されます。同様に、フォントサイズ、フォントフェイス、フォントスタイルなどがそれに応じて変化します。テキストが選択モードになっているときは、それを制御できないようです。選択後もフォント プロパティを変更したくありません。このテキスト属性の変更を回避するにはどうすればよいですか?