• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSOutlineView: expand all items. How?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView: expand all items. How?


  • Subject: Re: NSOutlineView: expand all items. How?
  • From: Daniel Jalkut <email@hidden>
  • Date: Wed, 02 Nov 2005 11:30:05 -0500

Hi Luc - just go through once and accumulate a list of items, then expand them all. E.g. for each item you're currently calling "expandItem" on, just add it to an NSMutableArray. Then iterate the contents of the array and expand each one in turn.

Daniel

On Nov 2, 2005, at 10:58 AM, Luc Vandal wrote:

Hi!

I've been trying with no success to expand all items of a NSOutlineView. Here's my code:

int nRows = [treeView numberOfRows];

for(int i=0;i<nRows;i++)
{
    if( [treeView isExpandable:[treeView itemAtRow:i]] )
        [treeView expandItem:[treeView itemAtRow:i]];
}

I guess that by expanding an item, the number of rows changes and that results in having items that were not expanded. What's the proper way to accomplish this?

Thanks!

Luc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com


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
References: 
 >NSOutlineView: expand all items. How? (From: Luc Vandal <email@hidden>)

  • Prev by Date: Re: Is it a bad idea to invoke "init..." over and over on the same object?
  • Next by Date: Re: NSOutlineView: expand all items. How?
  • Previous by thread: NSOutlineView: expand all items. How?
  • Next by thread: Re: NSOutlineView: expand all items. How?
  • Index(es):
    • Date
    • Thread