Re: NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:?
Re: NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:?
- Subject: Re: NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:?
- From: Quincey Morris <email@hidden>
- Date: Wed, 03 Aug 2011 10:20:22 -0700
On Aug 3, 2011, at 05:41, Daniel Vollmer wrote:
> Now, what I'm trying to do is resize the tableview horizontally inside the scrollview *without* changing the size of the window itself[1]. I can do that easily enough by modifying its frame, but this seems to ignore the column auto-resizing and leaves the column at the original width. Of course, I could just set the new column width explicitly, but I'm trying use the autoresizing so that I can use NSViewAnimation to animate this transition.
> Any ideas on why the column autosizing doesn't work when setting the frame directly? I tried calling various NSView and NSControl methods to force a relayout after changing the size, but had no success.
By modifying the frame of what? You should be changing the scroll view frame, but you make it sound like you're changing the table view frame.
Also, check that you've enabled column resizing correctly in *both* places -- the column resizing behavior of the table view itself (it's a popup -- resize first column/resize last column/etc) AND the resizing behavior of the column (it's a checkbox prior to Xcode 4 IIRC, and a popup in Xcode 4).
_______________________________________________
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