• 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
NSOutlineView sizeLastColumnToFit after item expanded or collapsed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOutlineView sizeLastColumnToFit after item expanded or collapsed


  • Subject: NSOutlineView sizeLastColumnToFit after item expanded or collapsed
  • From: Jesse Grosjean <email@hidden>
  • Date: Sun, 4 Apr 2004 11:27:22 -0400

When an item is expanded or collapsed in my outline view the column extends past the right side of the outline view, such that if I have a horizontal scroll bar it will show up. Normally I can fix this by calling [outlineView sizeLastColumnToFit], but I can't get that to work when an item is expanded or collapsed by the user using the disclosure widget. This is the code that I would like to have, but that doesn't work:

- (void)outlineViewItemDidExpand:(NSNotification *)notification {
[outlineView sizeLastColumnToFit];
}

I can get it to work if I change the code to this:

- (void)outlineViewItemDidExpand:(NSNotification *)notification {
[outlineView performSelector:@selector(sizeLastColumnToFit) withObject:nil afterDelay:0];
}

But that's a bit of a hack and caused an undesired flashing as the screen is redrawn. Does anyone know where the appropriate place is to call sizeLastColumnToFit when an item is expanded or collapsed in an outline view?

Thanks,
Jesse
_______________________________________________
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.


  • Prev by Date: Re: Fast file access (was Re: [ANN] Shovel - Third-Party "Software Update")
  • Next by Date: Re: Java or Objective-C for Cocoa?
  • Previous by thread: Re: Best way to implement a modal window
  • Next by thread: OutlineView crashing on collapse (need help badly)
  • Index(es):
    • Date
    • Thread