Re: Obtaining the NSGraphicsContext for custom NSView
Re: Obtaining the NSGraphicsContext for custom NSView
- Subject: Re: Obtaining the NSGraphicsContext for custom NSView
- From: Serge Meynard <email@hidden>
- Date: Tue, 15 Mar 2005 10:43:05 -0500
It looks like you're trying to implement an NSSlider subclass, in
which case you're doing more work than you need to. Did you know
that you can override -drawKnob: in NSSliderCell?
Oh really? I just got stuff working on my end (I'm not going through
the drawRect method). How far can I go in customizing how the slider
looks
If you make an NSSliderCell subclass, you can draw whatever you like
in -drawInside:inView:.
Also, if your knob or bar aren't the standard size (which varies on
controlSize) you'll probably want to override NSSlider's -sizeToFit to
keep it from adjusting itself.
When I was looking at NSSlider last week, it struck me that you
apparently can't override the tick mark drawing code. I had thought of
doing so to selectively change the color of some of the tick marks. Did
I miss something?
_______________________________________________
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