• 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: NSTableView, variable row heights, small fonts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView, variable row heights, small fonts


  • Subject: Re: NSTableView, variable row heights, small fonts
  • From: Steven Spencer <email@hidden>
  • Date: Fri, 21 Oct 2005 11:33:06 +0100

To calculate cell height for a column width, you can use the following code,
where col is your NSTableColumn instance.  Row height is the greatest height
of all the cells in a row.

NSCell *rowCell;
float cellHeight;

rowCell = [col dataCellForRow:row];
[rowCell setWraps:YES];
[rowCell setObjectValue:myAttributedString];

cellHeight = [rowCell cellSizeForBounds:NSMakeRect(0.0, 0.0, [col width], FLT_MAX)].height;


  - Steve Spencer
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Multi-threaded opengl or view access crashes system?
  • Next by Date: Flipping within a cell?
  • Previous by thread: Re: NSTableView, variable row heights, small fonts
  • Next by thread: How can a pallete use an NSManagedObject?
  • Index(es):
    • Date
    • Thread