views:

41

answers:

2

How do I hide an NSTableView header completely, so that it does not take any space up?

+2  A: 

In Interface Builder, select the table view, open the attributes inspector (command-1), and uncheck the "Headers" checkbox in the "Columns" section.

Brian Webster
+1  A: 

To do this programmatically, you can subclass NSTableView (or any NSTableView child class) and return nil for the headerView variable:

@interface AppTableView : NSTableView {

}

@end

@implementation AppTableView

- (NSTableHeaderView *)headerView{
    return nil;
}

@end
Scott Harwell