NSOutlineView sizeLastColumnToFit after item expanded or collapsed
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.