Re: NSTableView, variable row heights, small fonts
Re: NSTableView, variable row heights, small fonts
- Subject: Re: NSTableView, variable row heights, small fonts
- From: Steven Spencer <email@hidden>
- Date: Fri, 21 Oct 2005 11:33:06 +0100
To calculate cell height for a column width, you can use the following code,
where col is your NSTableColumn instance. Row height is the greatest height
of all the cells in a row.
NSCell *rowCell;
float cellHeight;
rowCell = [col dataCellForRow:row];
[rowCell setWraps:YES];
[rowCell setObjectValue:myAttributedString];
cellHeight = [rowCell cellSizeForBounds:NSMakeRect(0.0, 0.0, [col width], FLT_MAX)].height;
- Steve Spencer
_______________________________________________
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