Is there an easy way to change the font size for a NSTableView ?
I’ve tried this”
- (void)drawRect:(NSRect)r {
[self setFont:[NSFont fontWithName:@"Verdana" size:7]];
[self reloadData];
[super drawRect:r];
}
I’m sure drawRect is invoked but it doesn’t work
I’ve also tried this:
NSArray *columns = [self tableColumns];
for (id column in columns) {
id cell = [column dataCell];
[cell setFont: [NSFont fontWithName: @"Geneva" size:22.0] ];
//[column setDataCell:cell]; tried both with and without
}
[self reloadData];
before to print the table.
thanks
Create
For each column. then use
dataCell:method which will returns theNSCellobject then applysetFont:method on that object.