Difference between revisions of "NSTableView"

From GNUstepWiki
Jump to navigation Jump to search
(No difference)

Revision as of 21:31, 16 February 2005

Table ...

Code chunks

Autosize row height according to font

Following code autosizes the row height according to the size of data cell font:

- (void)autosizeRowHeight
{
   NSTableColumn *col = [[self tableColumns] objectAtIndex:0];
   NSFont        *font;

   font = [[col dataCell] font];

   [self setRowHeight:[font maximumAdvancement].height];
}

Use the method in a category of NSTableView.