: 행을 추가
[myTable setBackgroundColor:[NSColor clearColor]];
[[myTable enclosingScrollView] setDrawsBackground: NO];
코드 할 것. 그래서 같은 방법 : 행 : 당신의 NSTableView는 당신이 preparedCellAtColumn을 무시할 수를 서브 클래스
- (NSCell*) preparedCellAtColumn:(NSInteger)column row:(NSInteger)row {
NSTextFieldCell *edit_field;
edit_field = (NSTextFieldCell*) [super preparedCellAtColumn:column row:row];
if ([self editedRow] == row && [self editedColumn] == column ) {
[edit_field setBackgroundColor:[NSColor clearColor]];
[edit_field setDrawsBackground:NO];
}
return edit_field;
}
그러나, NSTableView는 문서는 셀 색상을 재설정 할 것 같다라는 다른 방법을 가지고 있음을 나타냅니다. (editWithFrame : inView : editor : delegate : event :)이 메서드를 재정의하는 NSTextViewCell의 하위 클래스를 만들면 원하는 것을 수행 할 수 있습니다. 나는이 발견 문서를 통해 검색
편집 :
수신기가 텍스트 형 NSCell에 객체가 아닌 경우는, 어떤 편집이 수행되지 않습니다. 그렇지 않으면 필드 편집기 (textObj)의 크기가 aRect이고 superview가 controlView로 설정되어 수신기를 정확히 덮습니다.
그래서이 경우 사용자 지정해야하는 항목은 NSTableView 또는 셀에서 수행중인 모든 디스플레이 변경을 숨기는 필드 편집기입니다. toObject :
편집 이를 시도
이것은 NSTableView는 그것을 반환하기 전에 편집 된 셀의 속성을 설정하도록해야
필드 편집기는 윈도우 대리인의 방법 windowWillReturnFieldEditor에 의해 반환되는 아무 소용 그러나 밖으로 도울 수 있습니다
-(id) windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)client{
NSText *editor = [window fieldEditor:YES forObject:client];
[editor setBackgroundColor:[NSColor clearColor]];
[editor setDrawsBackground:NO];
return [editor autorelease];
}
사람이 도움을 제공 할 수 있습니다 들어, 작동이 가능 – Swati