开发者

NSTableView rounded corners

For drawing rounded corners in the NSTableV开发者_如何学Ciew subclass I override the drawRect method

- (void)drawRect:(NSRect)rect{
    NSBezierPath* path = [NSBezierPath bezierPathWithRoundedRect:rect cornerRadius:7.0f];
    [path addClip];
    [super drawRect:selfRect];
}

This works as long as the content of the table view is not too big and not showing the scrollers. But when the content gets bigger, the scrollers of the NSScrollView are displayed and the rounded edges disappear.

Any hints for this?


Since a table view is contained in a scroll view, I guess what you want is a scroll view but not table view with rounded corners. Maybe you can try to subclass the scroll view.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜