• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Changing Cell Size in at TableView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing Cell Size in at TableView?


  • Subject: Re: Changing Cell Size in at TableView?
  • From: j o a r <email@hidden>
  • Date: Fri, 16 Jul 2004 14:02:06 +0200

I'm using this way to set the font, but I also have problems with the
bottom part of the text getting clipped in some cases. I think it is a
bug in the table view.

- (void) setTableViewFont:(NSFont *) aFont
{
NSEnumerator *enumerator = [[tableView tableColumns] objectEnumerator];
NSTableColumn *tableColumn;
while ((tableColumn = [enumerator nextObject]) != nil)
{
[[tableColumn dataCell] setFont: aFont];
}

[tableView setRowHeight: ([aFont defaultLineHeightForFont] + 1.0)];

[self reloadTableView];
}

j o a r

On 2004-07-16, at 13.20, Jerry LeVan wrote:

> Yes, I found that late last night. The font metrics are still
> messing up a bit... here is what I am currently using in
> my subclassed table view. This works fine with some fonts
> and not so fine with some others...The bottoms seem to get
> clipped/crowded with certain fonts.
>
> Jerry
>
> -(void)changeFont:(id)sender
> {
> int i;
> NSFont *oldFont = currentFont;
> currentFont = [sender convertFont:oldFont];
> NSArray *theCols = [self tableColumns];
> int colCnt = [self numberOfColumns];
> for(i=0; i< colCnt; i++)
> {
> [[[theCols objectAtIndex:i] dataCell] setFont:currentFont];
> }
> [self setRowHeight:[currentFont pointSize]+3];
> //[self tile];
> [self setFont:currentFont];
> }

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Changing Cell Size in at TableView?
      • From: Jerry LeVan <email@hidden>
References: 
 >Changing Cell Size in at TableView? (From: Jerry LeVan <email@hidden>)
 >Re: Changing Cell Size in at TableView? (From: Jeremy Dronfield <email@hidden>)
 >Re: Changing Cell Size in at TableView? (From: Jerry LeVan <email@hidden>)

  • Prev by Date: Re: Changing Cell Size in at TableView?
  • Next by Date: programmatically accessing a web form?
  • Previous by thread: Re: Changing Cell Size in at TableView?
  • Next by thread: Re: Changing Cell Size in at TableView?
  • Index(es):
    • Date
    • Thread