How can I have the only column of my NSTableView take all the width of the TableView?

tsimbalar picture tsimbalar · Sep 25, 2011 · Viewed 13.1k times · Source

I am currently trying to learn a bit of Cocoa (using the book Cocoa Programming for Mac OS X). In one of the exercises, we set up a NSTableView with only one column, to act as a list of things.

What annoys me is that in Interface Builder, I could not find a way to have the (only) column always take the full width of the NSTableView. As a consequence, it always somehow looks like there are 2 columns when there is actually only one.

Any idea ?

Answer

TheAmateurProgrammer picture TheAmateurProgrammer · Sep 25, 2011

This is just an IB problem that happens all the time (I'm not sure why). To solve this, simply just resize the table view to the size smaller than the 2nd column, then drag it back to the size you want and the 2nd column will disappear.