• 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 and expanded items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView and expanded items


  • Subject: Re: NSOutlineView and expanded items
  • From: Dix Lorenz <email@hidden>
  • Date: Fri, 28 Feb 2003 14:26:01 +0100

But I never "add" an item to the OutlineView. I just send a message reloadItem:reloadChildren: for the item where I added items in the model. At some point the OutlineView asks my datasource for the new items, but I have no chance telling it that it should be expanded. I could call expandItem (or expandItem: expandChildren:) after the reloadItem:reloadChildren:, but I don't want the Outlineview to show the new items to the User and only then expanding them. That would be ugly. Also I think right after reloadItem the OutlineView has no concept of the new items, so what should it do with a message to expand it?

I haven't tested it, it could also be that displaying only happens after the calls to expandItem. But if I understood the whole concept correctly, I tell the OutlineView to reload some items, which it will do when necessary. When it wants to display itself, it will ask for the information, but then it would be too late for calls to expandItem.

Thanks,
Dix


You need to use the NSOutlineView method expandItem:

To initially expand all items, just iterate through every item and call
expandItem: on each one.

In the code you use to add a new item just call expandItem: on the item
after you add it.

Date: Thu, 27 Feb 2003 18:05:54 +0100
Subject: NSOutlineView and expanded items
From: Dix Lorenz <email@hidden>
To: email@hidden

Hi,

I have a problem using an NSOutlineView: I'd like some (actually all)
items to be initially expanded. Also while running the program I am
adding new items which also should be expanded. I haven't found
anything in the datasource or the delegate to do this...

Thanks,
Dix
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: NSOutlineView and expanded items (From: Emma Whan <email@hidden>)

  • Prev by Date: Poor blitting performance?
  • Next by Date: Re: Poor blitting performance?
  • Previous by thread: Re: NSOutlineView and expanded items
  • Next by thread: Poor blitting performance?
  • Index(es):
    • Date
    • Thread