Re: multiple lines in NSTableView
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