Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: variable cell sizes in NSTableView



Michael,
This is supported in Tiger -- there is a delegate method to return the height of a particular row. You can return whatever height you want. To return a custom cell that draws like a separator, you will have to subclass NSTableColumn and override dataCellForRow. You will probably also want to implement the shouldSelectRow: delegate method and not allow selection of those seperator rows. good luck!
-corbin



On Feb 9, 2006, at 11:47 AM, Michael Link wrote:

I have a source view implemented by an instance of NSTableView. 1 column for the icon on the left and 1 column for the text on the right (vertically centered). This looks exactly how you would expect a generic source view to look (like the sidebar in the finder).

I am trying to figure out the best way to implement a separator cell (similar to how the Finder has it, see here for screen shot http://julia.fractal.net/images/finder.png ). Is it possible to dynamically change the width and height of a cell while the tableview is drawing? Or is there some other method that works better? Thanks.

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >variable cell sizes in NSTableView (From: Michael Link <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.