drawKnob in NSSliderCell subclass
drawKnob in NSSliderCell subclass
- Subject: drawKnob in NSSliderCell subclass
- From: "Christoph Teschner" <email@hidden>
- Date: Wed, 17 May 2006 17:21:20 +0200
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:
This email sent to email@hidden