Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 NSTableView 更改滚动条的背景颜色?例如,我为我的 TableView 设置了黑色背景颜色并获得了白色滚动条,我想要滚动条背景的 ClearColor 或黑色。我怎样才能做到?
您需要子类化NSScroller并覆盖其-(void)drawRect:方法
NSScroller
-(void)drawRect:
- (void)drawRect:(NSRect)dirtyRect { // the only line is required [self drawKnob]; }