Re: Source list with counter next to item title
Re: Source list with counter next to item title
- Subject: Re: Source list with counter next to item title
- From: Conor <email@hidden>
- Date: Wed, 21 Nov 2007 10:57:49 +0100
> Right before this approach I subclassed nstextfieldcell and draw a filled
> oval to contain the textual count, it works well, but not as much as this
> solution I suppose. What's the difference with mine solution, the final
> effect or what else?
There is really no exact approach. As you mentioned it's just a personal
choice. NSTextFieldCell works just as well, in fact if you wanted editing
it would be the way to go; it's lower in the chain (after NSActionCell) and
has that functionality, including access to a field editor. It is even more
flexible than my solution, you could subclass drawInteriorWithFrame:inView:
and draw your oval to fit the cell size and let the cell take care of the
text. I just choose NSImageCell because it's something I am more familiar
with. I am glad you found the code useful.
- Conor
http://www.bruji.com/
_______________________________________________
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