Re: Subclassing NSLevelIndicatorCell
Re: Subclassing NSLevelIndicatorCell
- Subject: Re: Subclassing NSLevelIndicatorCell
- From: "Adam R. Maxwell" <email@hidden>
- Date: Thu, 28 Jun 2007 06:37:46 -0700
On Jun 28, 2007, at 03:56, Todd Freese wrote:
I am having troubles subclassing NSLevelIndicatorCell. I want to add
a text percentage display in the middle of the bar graph display.
This subclass is displayed in an NSTableView. My thoughts are to
subclass NSLevelIndicatorCell and override the drawWithFrame method.
However, my call to super does not seem to be working as my text is
displayed, but bar graph is not. Here is my code:
NSLevelIndicatorCell doesn't call the NSCell drawing methods AFAICT,
so subclassing it is impossible (rdar://problem/4998206). You can
override one of its private drawing methods such as
_drawRelevancyWithFrame:inView:, but that may break if and when they
fix it. I did it because the default height in a tableview is ugly,
so if it breaks it's not critical.
--
Adam
_______________________________________________
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