Set TableView font and rowHeight
Set TableView font and rowHeight
- Subject: Set TableView font and rowHeight
- From: Ivan C Myrvold <email@hidden>
- Date: Mon, 2 Apr 2007 11:21:49 +0200
I am changing the font of an NSTableView with the font panel. In the
NSTableView delegate method
tableView:willDisplayCell:forTableColumn:row: I have:
NSRect brect = [[self newFont] boundingRectForFont];
[aCell setFont: newFont];
[aTableView setRowHeight:brect.size.height];
But for some fonts, the table row height is not correct, e.g. Lucida
Bright font gets the text in the table view clipped at the bottom.
I suspect I have to do something more to get this right, but I have
run out of ideas.
Ivan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden