3
votes

How do I change Header font size / color and other properties of NSTableHeaderView ?

Some one has already answered the question here, but the accepted answer is outdated, since it is for Cell Based TableViews.

I am looking for a solution that would support View based NSTableView

1
NSTableColumn's headerCell is not deprecated.Willeke

1 Answers

0
votes

Unfortunately view based column headers are still unsupported (I mean not using NSTableHeaderViewCell)

Just take a look into "NSTableColumn.h" and you will see that there is following property which has a "kindof" -> not possible to use NSView.

/* Gets and sets the headerCell associated with this NSTableColumn. 'cell' must be non nil, and should be a member of the

NSTableHeaderCell class. The 'headerCell' is a strong reference, and will be retained. */

@property (strong) __kindof NSTableHeaderCell *headerCell;

The only way to achieve what you need is to set properties on NSTableHeaderCell which is a subclass of "NSTextFieldCell".