NSOutlineView - How to hide disclosure triangle for root nodes ?

2009-11-25 Thread Mario Kušnjer
Hello to all on the list. I have a little question so if anyone could help me. I'm have an outline view that has one (for now) object in root array that acts as a root from which all other objects derives. \/ Root Array |\/ Root object

Re: NSOutlineView - How to hide disclosure triangle for root nodes ?

2009-11-25 Thread Jens Alfke
On Nov 25, 2009, at 5:49 AM, Mario Kušnjer wrote: How to hide the disclosure triangle in front of the Root object and remove indentation for it, and just that object (and later if there is more Root objects for them too) ? I think what you're looking for is the delegate method -

Re: NSOutlineView - How to hide disclosure triangle for root nodes ?

2009-11-25 Thread Mario Kušnjer
On 2009.11.25, at 17:20, Jens Alfke wrote: On Nov 25, 2009, at 5:49 AM, Mario Kušnjer wrote: How to hide the disclosure triangle in front of the Root object and remove indentation for it, and just that object (and later if there is more Root objects for them too) ? I think what you're

Re: NSOutlineView - How to hide disclosure triangle for root nodes ?

2009-11-25 Thread Jean-Daniel Dupas
Le 25 nov. 2009 à 17:49, Mario Kušnjer a écrit : On 2009.11.25, at 17:20, Jens Alfke wrote: On Nov 25, 2009, at 5:49 AM, Mario Kušnjer wrote: How to hide the disclosure triangle in front of the Root object and remove indentation for it, and just that object (and later if there is

Re: NSOutlineView - How to hide disclosure triangle for root nodes ?

2009-11-25 Thread Dave DeLong
You want this delegate method: - (BOOL)outlineView:(NSOutlineView *)outlineView shouldShowOutlineCellForItem:(id)item; Cheers, Dave On Nov 25, 2009, at 9:49 AM, Mario Kušnjer wrote: On 2009.11.25, at 17:20, Jens Alfke wrote: On Nov 25, 2009, at 5:49 AM, Mario Kušnjer wrote: How to

Re: NSOutlineView - How to hide disclosure triangle for root nodes ?

2009-11-25 Thread Mario Kušnjer
Question for Jean-Daniel and Dave Is that delegate method in Snow Leopard ? Because I don't see it in Leopard ! - (BOOL)outlineView:(NSOutlineView *)outlineView shouldShowOutlineCellForItem:(id)item; Mario Kušnjer mario.kusn...@sb.t-com.hr +385957051982

Re: NSOutlineView - How to hide disclosure triangle for root nodes ?

2009-11-25 Thread Matthew Lindfield Seager
On Thursday, November 26, 2009, Mario Kušnjer mario.kusn...@sb.t-com.hr wrote: Is that delegate method in Snow Leopard ? Because I don't see it in Leopard ! - (BOOL)outlineView:(NSOutlineView *)outlineView shouldShowOutlineCellForItem:(id)item; I wanted to do something similar recently on

Re: NSOutlineView - How to hide disclosure triangle for root nodes ?

2009-11-25 Thread Mario Kušnjer
Disregard that last question. I have just checked online documentation on Apple Dev site. It's Snow Leopard feature, not available in Leopard. So, I should subclass NSOutlineView to solve my problem (on Leopard) ? Mario Kušnjer mario.kusn...@sb.t-com.hr +385957051982

Re: NSOutlineView - How to hide disclosure triangle for root nodes ?

2009-11-25 Thread Jim Puls
Yes, the documentation for that (Snow Leopard) delegate method tells you where to go: subclass NSOutlineView, implement the (Leopard) method - (NSRect)frameOfOutlineCellAtRow:(NSInteger)row and return NSZeroRect for the appropriate row(s). - jp On Nov 25, 2009, at 11:38 AM, Mario Kušnjer

Re: NSOutlineView - How to hide disclosure triangle for root nodes ?

2009-11-25 Thread Mario Kušnjer
Hi ! So I have sub classed NSOutlineView and implemented single method like this: - (NSRect)frameOfOutlineCellAtRow:(NSInteger)row { return row == 0 ? NSZeroRect : [super frameOfOutlineCellAtRow:row]; } That works except the indentation problem is still on. If root object is empty

Re: NSOutlineView - How to hide disclosure triangle for root nodes ?

2009-11-25 Thread Mario Kušnjer
Here's me again ! So I have found a different solution for my problem and it does not include subclassing NSOutlineView, but trough the use of two delegate method. This is my implementation: - (NSCell *)outlineView:(NSOutlineView *)outlineView dataCellForTableColumn:(NSTableColumn