Re: -[NSOutlineView setAutosaveTableColumns:YES] and growing column widths
Re: -[NSOutlineView setAutosaveTableColumns:YES] and growing column widths
- Subject: Re: -[NSOutlineView setAutosaveTableColumns:YES] and growing column widths
- From: Ryan Britton <email@hidden>
- Date: Tue, 14 Nov 2006 14:29:03 -0800
It's a bit hard to find, but this is what you're looking for.
http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/Classes/NSOutlineView_Class/Reference/Reference.html#//
apple_ref/occ/instm/NSOutlineView/setAutoresizesOutlineColumn:
On Nov 14, 2006, at 1:29 PM, John C. Daub wrote:
Hello.
I have an NSOutlineView where I have -setAutosaveName:@"Foo" and
-setAutosaveTableColumns:YES. The user is allowed to resize the
columns,
rearrange the columns, thus these are things I wish to preserve.
However,
I've noticed that my first column (the one with the disclosure
triangles)
grows in width over time. It seems to be growing by the amount of
indent for
each level disclosed.
You can see this using Apple's DragNDropOutlineView sample code. To
-[AppController awakeFromNib] add:
[outlineView setAutosaveName:@"DragNDropTable"];
[outlineView setAutosaveTableColumns:YES];
Build the sample and run. Note the width of the 1st column. Take
the first
item/row and disclose it, then keep disclosing deeper and deeper.
Note the
width of the 1st column. Quit the app. Relaunch the app. Note the
1st column
width is now wider, at the point it was widened to from all the
previous
disclosures. You can repeat this as often as you'd like... the
column width
forever growing and being preserved. This isn't desired because
eventually
your 1st column gets mighty wide; a user shouldn't have to deal
with that.
Since I can reproduce this in an Apple sample, I'm wont to believe
this is
error on my part, that I'm not setting something up correctly, thus
I get
this behavior. Am I doing something wrong? Is there a way to
correct/prevent
this behavior? Maybe a hack/workaround for it?
I tried searching mailing list archives and documentation but
didn't find
anything. I may have used the wrong keywords to search by.
Thank you.
--
John C. Daub }:-)>=
<mailto:email@hidden> <http://www.hsoi.com/>
"Learn to be still." - Don Henley, the Eagles.
_______________________________________________
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
_______________________________________________
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