Re: Fastest way to "ExpandAll" in NSOutlineView
Re: Fastest way to "ExpandAll" in NSOutlineView
- Subject: Re: Fastest way to "ExpandAll" in NSOutlineView
- From: James Bucanek <email@hidden>
- Date: Mon, 5 Jun 2006 23:07:25 -0700
Sanford Selznick wrote on Monday, June 5, 2006:
>I'd like to expand-/collapse-all cells in an NSOutlineView
>programmatically. The code below runs fine, but is slow once there
>are more than a few hundred rows in the NSOutlineView.
>
>for (int c = 0; c < [ov numberOfRows]; c++) {
> id item = [ov itemAtRow:c];
> if (expand) {
> [ov expandItem:item];
> }
> else {
> [ov collapseItem:item];
> }
>}
>
>Any ideas how to make it faster?
Try using
[tableView expandItem:rootItem expandChildren:YES]
or
[tableView collapseItem:rootItem collapseChildren:YES]
--
James Bucanek
_______________________________________________
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