• 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: Fastest way to "ExpandAll" in NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Fastest way to "ExpandAll" in NSOutlineView
      • From: Darkshadow <email@hidden>
References: 
 >Fastest way to "ExpandAll" in NSOutlineView (From: Sanford Selznick <email@hidden>)

  • Prev by Date: crash when using notification center and self
  • Next by Date: Re: Fastest way to "ExpandAll" in NSOutlineView
  • Previous by thread: Fastest way to "ExpandAll" in NSOutlineView
  • Next by thread: Re: Fastest way to "ExpandAll" in NSOutlineView
  • Index(es):
    • Date
    • Thread