• 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: Variable Size Matrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable Size Matrix


  • Subject: Re: Variable Size Matrix
  • From: "John C. Randolph" <email@hidden>
  • Date: Thu, 22 Nov 2001 14:21:43 -0800

On Thursday, November 22, 2001, at 01:31 PM, Donald Brown wrote:

I need a Matrix or table where both the column widths and row heights may be
inconsistent (some rows will have a greater height than others). Obviously,
neither NSMatrix nor NSTableView will work, neither of them can deal with
variable row heights. Is there some other tool I'm missing, or do I have to
roll my own? If the later, would it be easier to subclass NSMatrix,
NSTableView, or work from scratch?

Back in the NeXTStep days, there were a few examples of Matrix (not NSMatrix) subclasses with variable cell sizes. IIRC, they only needed to override -cellFrameAtRow:column:, -getRow:column:forPoint:, and perhaps -sizeToCells to get they behavior they wanted.

I think I did this myself at some point, but I don't recall if I subclassed Matrix or started with View. I do recall using a C array of NXSizes to keep the list of cell sizes. The length of the list was the greater of the number of rows or columns.

-jcr

"The problem with trying to child-proof the world, is that it makes people neglect the far more important task of world-proofing the child." -- Hugh Daniel


References: 
 >Variable Size Matrix (From: Donald Brown <email@hidden>)

  • Prev by Date: Variable Size Matrix
  • Next by Date: buddy windows
  • Previous by thread: Variable Size Matrix
  • Next by thread: Re: Variable Size Matrix
  • Index(es):
    • Date
    • Thread