Quick (?) NSCell question: getting the drawing (inner) rectangle
Quick (?) NSCell question: getting the drawing (inner) rectangle
- Subject: Quick (?) NSCell question: getting the drawing (inner) rectangle
- From: Luke Evans <email@hidden>
- Date: Wed, 14 Jan 2009 22:07:08 -0800
I'm trying to determine what a cell's drawing rect will be
(particularly the 'interior' size eventually expected to be sent to -
drawInteriorWithFrame:inView: when the cell is actually drawn).
I can get the 'prototypical' cell object by asking for the pertinent
NSTableView column, and then asking for the cell. I can see that
NSCell supports a range of methods under the heading "Determining Cell
Size" in the docs.
The method -drawingRectForBounds: looks promising, but it takes
another rectangle, i.e. the "bounds". Assuming that this method would
give me what I want, how do I first obtain the appropriate 'bounds' to
feed it?
Perhaps this method is only intended to provide information to the
system by the NSCell implementation and is not intended for the
purpose I need. In which case, is there a way to achieve what I want
without having to ask for the NSTableColumn width and working out what
proportion of this width is used for non-'interior' furniture (if any)?
Cheers
-- Luke
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden