• 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
Setting origins for NSMatrix cells
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting origins for NSMatrix cells


  • Subject: Setting origins for NSMatrix cells
  • From: P Teeson <email@hidden>
  • Date: Fri, 7 Apr 2006 23:06:22 -0400

Using Mac OS X 10.4.5, XCode 2.2.1.

In my app I have an NSMatrix subclass with overridden methods initWithFrame and drawRect.
The cell class is a subclass of NSButtonCell
It's overridden method is drawWithFrame (working with flipped co- ordinates although I never set
that in any graphics context).


There are 9 cells in a 3 by 3 array in the matrix view.

My problem is that the cellFrames passed in to this method have origins that are not what I want.
For example the first cell is at 0,0 when I really want it to be inset from the controlView frame by
a few pixels - e.g. at 4,4.


Now of course I can write code to adjust the cellFrame rects to meet my needs.

But this seems excessive to me when some method somewhere is already computing the cellFrame.
My guess is that this is happening somewhere in NSMatrix or it's ancestors but so far
I have not been able to track it down.


Any suggestions would be gratefully received.

TIA and

respect....

Peter


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Setting origins for NSMatrix cells
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: NSBitmapImageRep subclass problem
  • Next by Date: Re: Setting origins for NSMatrix cells
  • Previous by thread: advice needed for NSArrayController's selection bindings
  • Next by thread: Re: Setting origins for NSMatrix cells
  • Index(es):
    • Date
    • Thread