• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Quick (?) NSCell question: getting the drawing (inner) rectangle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Quick (?) NSCell question: getting the drawing (inner) rectangle
      • From: Benjamin Stiglitz <email@hidden>
    • Re: Quick (?) NSCell question: getting the drawing (inner) rectangle
      • From: Luke Evans <email@hidden>
  • Prev by Date: Re: NIB's owner doesn't get released because of NSArrayController
  • Next by Date: Center image in NSTableView header
  • Previous by thread: Re: what the hell is Error (1007) creating CGSWindow?
  • Next by thread: Re: Quick (?) NSCell question: getting the drawing (inner) rectangle
  • Index(es):
    • Date
    • Thread