Re: NSScroller width
Re: NSScroller width
- Subject: Re: NSScroller width
- From: Brandon Walkin <email@hidden>
- Date: Sun, 30 Aug 2009 15:20:14 -0400
Use +scrollerWidth and +scrollerWidthForControlSize. Here's a custom
scroller subclass from BWToolkit which might help you out: http://bitbucket.org/bwalkin/bwtoolkit/src/tip/BWTransparentScroller.m
Brandon
On 2009-08-30, at 5:25 AM, Massimiliano Gargani wrote:
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@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden