• 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: multiple lines in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiple lines in NSTableView


  • Subject: Re: multiple lines in NSTableView
  • From: Scott Stevenson <email@hidden>
  • Date: Mon, 1 Jan 2007 05:23:57 -0800


On Dec 31, 2006, at 12:17 AM, Ferhat Ayaz wrote:

Can NSTableView assign row height for each row depending on line count for the entity field individually?

It won't do it automatically, but you could do it in the delegate by implementing:


- (float)tableView:(NSTableView *)tableView heightOfRow:(int)row;

Inside that method you would use the NSArrayController's - arrangedObjects array and get the item at the index of 'row'. If has two lines, you can return double the normal line height (maybe 36.0, for example).

This only works in 10.4 and later. If you need it to work on an earlier version there's a third party class out there somewhere that does something similar (though I'm not sure it's still maintained).

   - Scott
_______________________________________________

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: multiple lines in NSTableView
      • From: Scott Ribe <email@hidden>
References: 
 >multiple lines in NSTableView (From: Ferhat Ayaz <email@hidden>)

  • Prev by Date: Re: Problem with WebKit Download Delegate
  • Next by Date: Re: How to NSTableView and NSArrayConroller
  • Previous by thread: multiple lines in NSTableView
  • Next by thread: Re: multiple lines in NSTableView
  • Index(es):
    • Date
    • Thread