• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSScroller width
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSScroller width
      • From: Massimiliano Gargani <email@hidden>
References: 
 >NSScroller width (From: Massimiliano Gargani <email@hidden>)

  • Prev by Date: Re: Async NSURLConnection + Concurrent NSOperation = Not possible under Mac OS X 10.6?
  • Next by Date: Re: Normalize an NSAttributedString
  • Previous by thread: NSScroller width
  • Next by thread: Re: NSScroller width
  • Index(es):
    • Date
    • Thread