• 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
Re: Sizing NSMatrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sizing NSMatrix


  • Subject: Re: Sizing NSMatrix
  • From: glenn andreas <email@hidden>
  • Date: Tue, 20 Dec 2005 15:29:05 -0600


On Dec 20, 2005, at 9:24 AM, Herbert Putteneers wrote:

How can you make an NSMatrix fit exactly within certain bounds.
Apparently the cellwidth the matrix calculates can not be fractional.

When you create a 5x4 matrix, x- and y-spacing 0, then you can set its width to 145; the leftmost cell border is at x = 0 and the rightmost cell has the right border at 145. Increase the width to 146 and the right border stays put, leaving a 1 point gap. This continues until you reach a width of 150. 5 Columns, multiples of 5? It looks like NSMatrix is not using a fraction in its calculation.

Is there any way around this?

Probably not - NSCells, in general, do not like drawing in non- integral rectangles (because things usually look blurry when you have non-integral lines).

You could probably subclass NSMatrix, however, to more evenly distribute the spacing (so some things would end up a pixel wider than others, or have an extra pixel gap between them than others).


Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | build, mutate, evolve | images, textures, backgrounds, art

_______________________________________________
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
References: 
 >Sizing NSMatrix (From: Herbert Putteneers <email@hidden>)

  • Prev by Date: NSSQLiteStoreType: getting "...NSFaultingMutableSet bytes]: selector not recognized..." runtime errors
  • Next by Date: Generating Scrolling Text
  • Previous by thread: Sizing NSMatrix
  • Next by thread: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
  • Index(es):
    • Date
    • Thread