• 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
Set TableView font and rowHeight
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Set TableView font and rowHeight


  • Subject: Set TableView font and rowHeight
  • From: Ivan C Myrvold <email@hidden>
  • Date: Mon, 2 Apr 2007 11:21:49 +0200

I am changing the font of an NSTableView with the font panel. In the NSTableView delegate method tableView:willDisplayCell:forTableColumn:row: I have:

NSRect brect = [[self newFont] boundingRectForFont];
[aCell setFont: newFont];
[aTableView setRowHeight:brect.size.height];

But for some fonts, the table row height is not correct, e.g. Lucida Bright font gets the text in the table view clipped at the bottom.
I suspect I have to do something more to get this right, but I have run out of ideas.


Ivan
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Set TableView font and rowHeight
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Problem with writing image file.
  • Next by Date: Re: Problem with writing image file.
  • Previous by thread: Re: Problem with writing image file.
  • Next by thread: Re: Set TableView font and rowHeight
  • Index(es):
    • Date
    • Thread