Hi there,

I've googled a lot before post this question but I'm stucked.

I'm trying to subclassing NSScroller to change the aqua look and, most important, to change the width of the vertical scroll bar.

My subclass is:

- (void)drawRect:(NSRect)rect
{
        [self drawKnobSlot];
        [self drawKnob];
}

- (void)drawKnob
{
        NSRect rect = [self rectForPart:NSScrollerKnob];
        [[NSColor darkGrayColor] set];
        [NSBezierPath fillRect:rect];
}

- (void)drawKnobSlot
{
        NSRect rect = [self rectForPart:NSScrollerKnobSlot];
        [[NSColor grayColor] set];
        [NSBezierPath strokeRect:rect];
}

It works and change the look as I want but not the width. I tried to set rect width but is not the right way because the rect goes beyond the scrollview.

Any help is appreciated.

Thanks,
Max

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to