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: Scott Anguish <email@hidden>
- Date: Mon, 19 Nov 2007 04:30:16 -0500
just to follow up to my own answer.
if you're looking at leopard only compatibility, you may want to
consider NSCollectionView instead.
it would allow you to create the individual items as multiple views,
which may already support bindings
On Nov 19, 2007, at 4:23 AM, Scott Anguish wrote:
On Nov 19, 2007, at 4:14 AM, GbT wrote:
What's the best way to have a sourcelist with a counter next to the
title as
you see in many apps (Mail and other indie apps)? I mean the grey
circle-ellipse with the number of items written inside it.
Maybe I need to subclass NSCell
Yes, You'd need to write your own subclass of NSCell to do this.
Have a look at the ClockControl and SimpleBrowser examples in /
Developer/Examples/AppKit
and override the drawInteriorWithFrame:
method, but how could I set the counter from, let's say, an
arraycontroller?
Would it be possible using bindings?
You'd need to add bindings support to your subclass of NSCell.
I'm not sure that the on-disk version of ClockControl has this
implemented.. you may want to check the web version at
developer.apple.com to see if it is more current.
_______________________________________________
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
_______________________________________________
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