Skip navigation.
 
mlRe: Adjusting NSTableView row height for custom fonts
FROM : Ryan Stevens
DATE : Thu Jan 10 19:05:03 2002

- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
{
   return someAttributedString;
}

Other than that...uh, beats me! ;-)

On Thursday, January 10, 2002, at 06:56 PM, Matt Judy wrote:

> Hello,
>
> I'm allowing the user to select the font for browsing a list in an
> NSTableView.  I'm setting the font in the tableView's dataSource:
>
> - (void)tableView:(NSTableView *)aTableView
>      willDisplayCell:(id)aCell
>      forTableColumn:(NSTableColumn *)aTableColumn
>      row:(int)rowIndex
> {
>      if ([aCell respondsToSelector:@selector(setFont:)]) {
>          NSFont *font = [preferences browseTableFont];
>          [aCell setFont:font];
>      }
>
>      ...
> }
>
> When I do this, I have 2 problems.
>
> 1-) Even if I use the default font (Lucida Grande 13pt), it is drawn in
> the cell below middle.  NSCell doesn't seem to have a method for setting
> vertical alignment.
>
> 2-) The cell height is too small to display large fonts.  I can use
> setRowHeight: to adjust the height of the cells, but the centering thing
> is still a problem.
>
> I'm assuming there's a nice implementation already in use out there...
> How have you guys been doing this?
>
> Thanks.
> --Matt Judy
>
>
> _______________________________________________
> MacOSX-dev mailing list
> <email_removed>
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>



Related mailsAuthorDate
mlAdjusting NSTableView row height for custom fonts Matt Judy Jan 10, 18:57
mlRe: Adjusting NSTableView row height for custom fonts Ryan Stevens Jan 10, 19:05
mlRe: Adjusting NSTableView row height for custom fonts Bartsch, Alec Jan 10, 19:34
mlRe: Adjusting NSTableView row height for custom fonts Matt Judy Jan 10, 23:59
mlRe: Adjusting NSTableView row height for custom fonts Ryan Stevens Jan 11, 22:37