Re: NSOutlineView: expand all items. How?
Re: NSOutlineView: expand all items. How?
- Subject: Re: NSOutlineView: expand all items. How?
- From: Chuck Pisula <email@hidden>
- Date: Fri, 4 Nov 2005 07:59:36 -0800
On Nov 2, 2005, at 7: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?
Yup. you guessed right.
Iterate through the children of the root item instead and convert
them to rows each time you need to.
-c
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:
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