Re: Customize the disclosure triangles in NSOutlineView
Re: Customize the disclosure triangles in NSOutlineView
- Subject: Re: Customize the disclosure triangles in NSOutlineView
- From: "Adam R. Maxwell" <email@hidden>
- Date: Sat, 8 Sep 2007 18:30:54 -0700
On Sep 8, 2007, at 12:54, Mark Alldritt wrote:
Hi All,
I'm trying to simulate the Source List views that appear in
iTunes/iPhoto/etc. In one of my applications and I've noticed that
the size
of the outline disclosure triangles is smaller than the ones
provided by
NSOutlineView. How does one change the appearance of the disclosure
triangles? These don't appear to be drawn by the dataCell.
I did this a while ago by implementing the delegate method
- (void)outlineView:(NSOutlineView *)ov willDisplayOutlineCell:
(id)cell forTableColumn:(NSTableColumn *)tc item:(id)item;
{
NSButtonCell *outlineCell = cell;
//
// create static NSImage instances for the cell
//
[outlineCell setImage:rightImage];
[outlineCell setAlternateImage:downImage];
}
If you find a better way, I'd be curious to know. I was trying to
implement an outline view similar to the one used by Spotlight on 10.4
(I can send a link to the source if you want...BSD license).
hth,
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