I am trying to draw a custom NSScroller, and I got basically everything that I wanted to work, but when I try to get rid of knobSlot, it will just constantly draw a pen:

That is, when I use drawRect: draw a background. When I remove drawRect: I get:

I still cannot get rid of knobSlot. Here is my code:
#import "UIScroller.h"
@interface UIScroller (Private)
- (void)drawKnobSlot;
@end
@implementation UIScroller
- (BOOL)isVertical {
NSRect bounds = [self bounds];
return NSHeight(bounds) < NSWidth(bounds);
}
+ (CGFloat)scrollerWidth {
return 13;
}
+ (CGFloat)scrollerWidthForControlSize:(NSControlSize)controlSize {
return 13;
}
- (void)drawKnobSlot;
{
NSRect slotRect = [self rectForPart:NSScrollerKnobSlot];
if ([self isVertical])
NSDrawThreePartImage(slotRect, [NSImage imageNamed:@"lazyarrow"], [NSImage imageNamed:@"lazyarrow"], [NSImage imageNamed:@"lazyarrow"], YES, NSCompositeSourceOver, 1, NO);
else
NSDrawThreePartImage(slotRect, [NSImage imageNamed:@"lazyarrow"], [NSImage imageNamed:@"lazyarrow"], [NSImage imageNamed:@"lazyarrow"], NO, NSCompositeSourceOver, 1, NO);
}
- (void)drawPart:(NSScrollerPart)part highlight:(BOOL)highlight {
NSRect partRect = [self rectForPart:part];
switch (part) {
case NSScrollerKnob: {
assert(!highlight);
if ([self isVertical]) {
partRect.origin.y++;
partRect.size.height -= 2;
} else {
partRect.origin.x++;
partRect.size.width -= 2;
}
NSRect newRect = NSMakeRect(partRect.origin.x+4, [self isVertical] ? partRect.origin.y+3 : partRect.origin.y, partRect.size.width - 6,[self isVertical] ? partRect.size.height-5 : partRect.size.height - 4);
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:newRect
xRadius:[self isVertical] ? 4: 4
yRadius:[self isVertical] ? 4 : 4];
[path setLineWidth:2];
[[NSColor colorWithDeviceRed:0.114 green:0.114 blue:0.114 alpha:.6] set];
[path fill];
[[NSColor colorWithDeviceWhite:1.0
alpha:0.100] set];
[path addClip];
[path stroke];
} break;
case NSScrollerIncrementLine: {
} break;
case NSScrollerKnobSlot: {
NSAssert(!highlight, nil);
#if 0
[[NSColor darkGrayColor] set];
#else
partRect = [self bounds];
NSGradient *gradient = [[[NSGradient alloc] initWithColorsAndLocations:
[NSColor colorWithDeviceRed:(161.0/255.0) green:(161/255.0) blue:(161/255.0) alpha:1.0], 0.0,
[NSColor colorWithDeviceRed:(186.0/255.0) green:(186/255.0) blue:(186/255.0) alpha:1.0], 0.067,
[NSColor colorWithDeviceRed:(219.0/255.0) green:(219/255.0) blue:(219/255.0) alpha:1.0], 0.2,
[NSColor colorWithDeviceRed:(230.0/255.0) green:(230/255.0) blue:(230/255.0) alpha:1.0], 0.333,
[NSColor colorWithDeviceRed:(240.0/255.0) green:(240/255.0) blue:(240/255.0) alpha:1.0], 0.667,
[NSColor colorWithDeviceRed:(223.0/255.0) green:(223/255.0) blue:(223/255.0) alpha:1.0], 0.8,
[NSColor colorWithDeviceRed:(204.0/255.0) green:(204/255.0) blue:(204/255.0) alpha:1.0], 0.867,
[NSColor colorWithDeviceRed:(178.0/255.0) green:(178/255.0) blue:(178/255.0) alpha:1.0], 1.0,
nil
] autorelease];
[gradient drawInRect:partRect angle:[self isVertical] ? 90. : 0.];
#endif
}
}}
- (void)drawKnob
{
[self drawPart:NSScrollerKnob highlight:NO];
[self setArrowsPosition:NSScrollerArrowsNone];
}
- (void)drawKnobSlotInRect:(NSRect)slotRect highlight:(BOOL)flag;
{
[self drawPart:NSScrollerKnobSlot highlight:NO];
}
@end
Does anyone know how to fix this problem so that it looks like iOS 'UIScrollView / UIScroller ?:

or Sparrow custom NSScrollers ?:
