I realized we're talking about different things. My mind when instantly to 
UITableView and I didn't realize we were talking about NSTableView. I can only 
speak for UITableView :)

Luke

On May 29, 2010, at 9:45 AM, Quincey Morris wrote:

> On May 29, 2010, at 08:56, Luke Hiesterman wrote:
> 
>> I'm not sure why you're trying to separate the ideas of row and cell height. 
>> I don't think there's any reason why you should ever attempt to have a cell 
>> whose height is different from the height returned in 
>> heightForRowAtIndexPath.
> 
> Well, the specific case I was thinking of is getting vertically centered text 
> in a NSTableView row. AFAIK there's no way to get this using standard 
> frameworks behaviors. The only way to get text vertically centered (AFAIK) is 
> to subclass the standard text cell and make it draw itself in a different 
> place relative to the row height. To me, that makes row height and cell 
> height different things.
> 
>> The table view does this for you based on the width of the table and the 
>> height the delegate returns. 
> 
> Not (AFAIK) for NSTextFieldCell. The height returned by 'cellSizeForBounds:' 
> is the height of the actual text, not the row height.
> 
> By contrast, the table view does change the cell height for button cells, and 
> the cell's behavior is to draw its content vertically centered. This has the 
> annoying side effect, when a row contains both a checkbox with text and a 
> text field with text, of not lining up the text baselines, unless the row 
> height matches the text height exactly.
> 
> If there's anything wrong with my understanding here, I'd be *very* happy to 
> know different.
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please 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:
> http://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com
> 
> This email sent to luket...@apple.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to