Re: Trying to change nsoutline disclosure triangle
Re: Trying to change nsoutline disclosure triangle
- Subject: Re: Trying to change nsoutline disclosure triangle
- From: Guillaume Gandreau <email@hidden>
- Date: Sat, 14 Jan 2006 08:28:55 +0100
Hi,
I'm not sure of what you want.
Children under your root have children themselves ?
If not, you don't have disclosure triangle.
So it's in the datasource method "- (BOOL)outlineView:(NSOutlineView
*)outlineView isItemExpandable:(id)item" that you must say if Root
Item ok, else not ok.
Hope this helps.
Guillaume
Le 14 janv. 06 à 04:09, Keith Pritchard a écrit :
I have an NSOutlineView in which I'd like disclosure triangles only
on the root item.
So, in the willDisplayOutlineCell delegate I'm testing to see if
the item is a root node and if it's not then don't display the
triangle.
Code below.... I get the NSLog output, so the delegate is being
called but the triangle is present on root and children. I thought
I could modify the cell to be NSNoImage or NullCell and it would be
result in a blank cell where the triangle was but nope.
Any ideas?? :/
-(void)outlineView:(NSOutlineView *)outlineView
willDisplayOutlineCell:(id)cell forTableColumn:(NSTableColumn *)
tableColumn item:(id)item
{
if ([[item objectForKey:@"rootItem"] isEqual:@"n"])
{
[cell setImage:NSNullCellType];
[cell setAlternateImage:NSNullCellType];
NSLog(@"Not a Root Item so draw noimage");
}
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40free.fr
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden