• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Source list with counter next to item title
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Best way of identifying duplicate files in Cocoa
  • Next by Date: Re: Writing NSString to a file descriptor
  • Previous by thread: Re: Source list with counter next to item title
  • Next by thread: how to convert char to int?
  • Index(es):
    • Date
    • Thread