Re: Trying to change nsoutline disclosure triangle
Re: Trying to change nsoutline disclosure triangle
- Subject: Re: Trying to change nsoutline disclosure triangle
- From: Keith Pritchard <email@hidden>
- Date: Sat, 14 Jan 2006 11:41:05 +0000
- Thread-topic: Trying to change nsoutline disclosure triangle
Hi Guillaume,
Thanks for your help but that¹s not what I want actually.
At the moment I have the standard behaviour which looks like this:-
>0
>1
>2
I want
>0
1
2
So I want to suppress the disclosure triangle for children which themselves
have children.
Keith
On 14/1/06 07:28, "Guillaume Gandreau" <email@hidden> wrote:
> 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:
>>
>> 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