Re: Can NSTableView have different sized rows?
Re: Can NSTableView have different sized rows?
- Subject: Re: Can NSTableView have different sized rows?
- From: Chris Hanson <email@hidden>
- Date: Sun, 5 Oct 2003 16:47:00 -0500
On Sunday, October 5, 2003, at 02:54 PM, Darrin Cardani wrote:
I can change all the rows to be 2 or more lines high, but what I would
like is to be able to have each row be only as tall as it needs to be
so that if there's only 1 line of text, it's only 1 line high, but if
there are 2 lines of text, it's 2 lines high, etc. Is that possible?
The docs have lots of info about changing the size of columns, but not
rows (other than -setRowHeight:, which sets the height of all rows to
the same thing).
NSTableView doesn't support variable row heights out of the box. There
are a few Open Source subclasses of NSTableView that do support
variable row heights; typically they do something like send a
-(int)heightForRow:(int)rowIndex message to the data source, and then
cache these internally.
Sorry I can't name any off the top of my head, but it should be fairly
easy to find one with Google with an acceptable (probably BSD or
MIT-style) license.
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Mac OS X Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
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.