• 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
Placing Cells in an NSMatrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Placing Cells in an NSMatrix


  • Subject: Placing Cells in an NSMatrix
  • From: Peter Teeson <email@hidden>
  • Date: Wed, 04 Apr 2012 15:20:08 -0400

Xcode 4.3, Lion 10.7.3

Given a 3 x 3 Matrix which is a sub-class of NSMatrix with Cells sub-classed from NSButton
the X origins of column 0 cells seem to be 1.0 point inside the Matrix bounds.

So if I want to stroke the Matrix bounds with a line width of e.g. 4.0 points
it draws over the left area of the column 0 cells.

Hence I would like to make sure that the origins of the cells are where I
want them to be, i.e. leave enough room to stroke the Matrix bounds.

I've read Matrix Programming Guide and looked at the NSMatrix and NSCell
references but I do not understand which methods to use to accomplish this.

Should I do this in NSCell calcDrawInfo? And then does that mean for each Cell?
Surely there must be simple way to provide a frame for all the Cells inset from the bounds of the Matrix.

Nor can I find a way to do this in Interface Builder.
AutoLayout is checked but Automatically Resizes Cells is not.

TIA for your help.

respect

Peter


_______________________________________________

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: Placing Cells in an NSMatrix
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: exception in init
  • Next by Date: Re: Placing Cells in an NSMatrix
  • Previous by thread: Re: exception in init
  • Next by thread: Re: Placing Cells in an NSMatrix
  • Index(es):
    • Date
    • Thread