• 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: drawKnob in NSSliderCell subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drawKnob in NSSliderCell subclass


  • Subject: Re: drawKnob in NSSliderCell subclass
  • From: Lon Giese <email@hidden>
  • Date: Wed, 17 May 2006 19:10:32 -0700

It sounds to me the big knob is getting clipped by the view... nothing can be drawn outside of the view. try giving the slider a bigger frame... with initWithFrame:
I'm totally guessing, but since you not getting much responses that will have do until someone else knows for sure.... or its worth a try until someone answers you....



On May 17, 2006, at 2:26 PM, Christoph Teschner wrote:

Yes, that could be. But I need to draw a bigger knob. Is there a way to make rectangle bigger?


From: Mike Abdullah <email@hidden>
To: "Christoph Teschner" <email@hidden>
CC: email@hidden
Subject: Re: drawKnob in NSSliderCell subclass
Date: Wed, 17 May 2006 18:11:55 +0100

Well presumably, you're attempting to draw outside the rectangle that is available!

On 17 May 2006, at 16:21PM, Christoph Teschner wrote:

Hi,

I am using custom NSSlider and NSSliderCell, so that I display a custom picture for the slider knob. Everything works fine as long as the picture is smaller than the original slider knob. But when it is bigger only a part is displayed.
I have overwritten -(void)drawKnob:(NSRect) in the NSSliderCell subclass the following way


- (void)drawKnob:(NSRect)knobRect {

NSImage * knob = _knobOn;
[[self controlView] lockFocus];
[knob compositeToPoint:NSMakePoint (knobRect.origin.x,knobRect.origin.y+knobRect.size.height) operation:NSCompositeSourceOver];


	[[self controlView] unlockFocus];
}

Any help would be great.

Christoph


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: drawKnob in NSSliderCell subclass (From: "Christoph Teschner" <email@hidden>)

  • Prev by Date: Re: drawKnob in NSSliderCell subclass
  • Next by Date: Re: CoreData vs. SQLite for Multi-User Simultaneous Access
  • Previous by thread: Re: drawKnob in NSSliderCell subclass
  • Next by thread: Re: drawKnob in NSSliderCell subclass
  • Index(es):
    • Date
    • Thread