Re: Counter field as in Mail.app
Re: Counter field as in Mail.app
- Subject: Re: Counter field as in Mail.app
- From: j o a r <email@hidden>
- Date: Fri, 25 Jan 2008 00:12:33 -0800
On Jan 25, 2008, at 12:05 AM, Ivan C Myrvold wrote:
How is the counter field (or what should I call it) implemented,
that is used in Mail.app to show how many unread mails you have in
Inbox?
I want to how the same field in an NSOutlineView in an application I
currently develops, but I have no idea where to look in the
documentation to find out how to do this.
Are you talking about the badge on the dock icon, or the counters in
the Mailboxes pane in the viewer window?
If you're talking about the per-mailbox unread counter I would guess
that's drawn by a custom cell subclass. Probably pretty easy to
implement - Just calculate the width of the string with the integer
counter, and then draw a wide enough background using NSBezierPath.
j o a r
_______________________________________________
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