views:

179

answers:

1

I have an NSTableView, and I have the ability for the user to show or hide columns dynamically (with a mail-style header context menu).

My issue is that if the table view is currently wider than it's scroll view (i.e. it's displaying a horizontal scroll bar) when a column is hidden or shown it resizes every single visible column such that they all fit on the screen again. How do I make it, well, not. I just want the hidden/shown column hidden/shown without any resizing of the other columns.

I tried setting the column resizing style to None is interface builder, but that didn't have any effect.

+2  A: 

You can do this by selecting each column individually in IB and disabling the Attributes->Resizes With Table checkbox.

Lawrence Johnston