Re: NSTableView: computing ideal row height for arbitrary font?
Re: NSTableView: computing ideal row height for arbitrary font?
- Subject: Re: NSTableView: computing ideal row height for arbitrary font?
- From: Jim Correia <email@hidden>
- Date: Fri, 30 Dec 2005 14:48:06 -0500
On Dec 27, 2005, at 8:26 PM, Jerry Krinock wrote:
on 05/12/27 16:06, Jim Correia at email@hidden wrote:
I have an NSTableView which I let the user pick the display font for.
After adjusting all the cells to use the font, I want to pick the
ideal row height for the tableview.
[font defaultLineHeightForFont] + 1
works in some situations, but is wildly off in others.
Interface Builder gets it right. How does it determine what row
height to use for the table?
That's a good question, and I hope someone has a good answer.
The only reliable way I have found to do this is to measure sample
string in the desired font to get the bounding box.
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden