What's the right way to make the last (or only) table column fill the width of an NSTableView?
What's the right way to make the last (or only) table column fill the width of an NSTableView?
- Subject: What's the right way to make the last (or only) table column fill the width of an NSTableView?
- From: Charles Jenkins <email@hidden>
- Date: Mon, 11 Jan 2010 13:58:08 -0500
I'm working on the examples in the (fantastic) Hillegass book.
The ZIP Inspector program works as advertised, but I'm annoyed by the
fact that the filenames shown in the Table View get truncated due to the
width of their column, which does not resize no matter how big I make
the Table View. (The Table View resizes with the window, and I've set
the column's Max Width to 10000.)
In case it matters, I'm running on Snow Leopard.
I'm surprised that when a Table View contains only one column, Apple
didn't design it to automatically fill the view. I have messed with the
table's autoresize settings in every way I can think of, but despite
what the NSTableViewColumnAutoresizingStyle
<http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTableView_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSTableViewColumnAutoresizingStyle>
settings' descriptions say, NONE of them changes the width of the column
automatically.
I have come up with a solution involving KVO, but it was so difficult
that I feel it must not be correct.
Anyone know of a combination of IB settings that will really, truly make
the last (or only) table column really, truly expand to fit the width of
the table view?
_______________________________________________
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