Outline view and horizontal scrolling
Outline view and horizontal scrolling
- Subject: Outline view and horizontal scrolling
- From: John Stiles <email@hidden>
- Date: Tue, 04 Dec 2007 13:58:30 -0800
I have an outline view which can grow and shrink when the window
resizes. It has one table column; I'm hiding the header since there's
only one column and it doesn't really make sense to show it.
By default I've found that this single column will grow and shrink
itself dynamically as the window resizes to match the outline view's
size. This means that I never get a horizontal scroll bar unless the
outline view gets smaller than the column's minimum width, even when
items in the outline view are actually truncated. The behavior I'd like
to see is a horizontal scroll bar appearing whenever any of the outline
view's items get clipped, but I can't figure out an easy way to do this.
If I could make the column's minimum width automatically track the
longest /visible/ item inside the outline view, I think it would work
the way I want it to, but that doesn't appear to be an option (short of
recalculating the min-width every time the user opens or closes a
triangle). The best option I've thought of so far would be to find the
widest item in the outline view and set the column minimum width to that
value, but that isn't perfect either—when the widest item is hidden
behind a closed triangle, we'd see a scroll bar for no reason.
Is this solvable or should I just accept defeat and set the column's
minimum width to the width of the widest item in the whole tree? (Or
will Cocoa do some magic behind the scenes so that this will all "just
work?")
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden