Re: Preventing NSSlider bar from drawing
Re: Preventing NSSlider bar from drawing
- Subject: Re: Preventing NSSlider bar from drawing
- From: Michael Watson <email@hidden>
- Date: Tue, 16 Jan 2007 16:53:25 -0500
Overriding private methods is unsound design. Ditto accessing private
variables.
Override -drawWithFrame:inView:, calculate where to draw the knob in
the control, invoke -drawBarInside:flipped:, and then invoke -drawKnob:.
That's what I've decided to do, and it looks like it should work.
--
mikey
On 16 Jan, 2007, at 16:22, Karl Moskowski wrote:
Andreas & Michael,
In your NSSliderCell subclass, you have to override the private
method _usesCustomTrackImage to suppress the drawing of the
slider's track.
- (BOOL)_usesCustomTrackImage {
return YES;
}
--Karl <email@hidden>
On 16-Jan-07, at 3:01 PM, email@hidden wrote:
Date: Tue, 16 Jan 2007 20:24:01 +0100
From: Andreas Mayer <email@hidden>
Subject: Re: Preventing NSSlider bar from drawing
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Am 16.01.2007 um 17:24 Uhr schrieb Michael Watson:
I can't seem to prevent the original Aqua bar from drawing.
Same here. I couldn't find a way that wouldn't require to essentially
replace the entire control.
Andreas
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
40bungie.org
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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