Basically, I have an NSTableView with 1 collumn, and I\'m inserting long strings into each row. However, not all the strings are long, so I\'d like the height of each row to
Code as per the above answer ...
NSString *string = [[_tableViewDataSourceArray objectAtIndex:rowIndex]
valueForKey:@"StringToDisplay"];
NSTableColumn *tableColoumn = [aTableView
tableColumnWithIdentifier:@"TableColumnIdentifier"];
if (tableColoumn)
{
NSCell *dataCell = [tableColoumn dataCell];
[dataCell setWraps:YES];
[dataCell setStringValue:string];
NSRect myRect = NSMakeRect(0, 0, [tableColoumn width], CGFLOAT_MAX);
heightOfRow = [dataCell cellSizeForBounds:myRect].height;
}