NSMatrix for spreadsheet implementation?

122 Views Asked by At

Okay, so I'd like to implement something similar to this image using NSMatrix.

enter image description here

My "table" will be large (scrollable in both directions).

I realize the prerequisite that NSMatrix cells are all the same size.

Here's a proposed solution:

  1. The white cells comprise the main NSMatrix
  2. The top row of dark gray header cells (except the leftmost one), are another NSMatrix
  3. The leftmost column of cells (including the top one), are another NSMatrix.

I would embed the white cells in a NSClipView/NSScrollView, with visible scrollers. I would also embed the top and left matrices similarly but with separate NSClipView/NSScrollView pairs, without visible scrollers.

Then, the main visible NSScrollView would notify the other NSScrollView's of movement as appropriate.

Is this a typical solution to this issue? Or is there some other custom-ish view I'm unaware of?

One other thing: if the content of the main NSMatrix is bound to an NSArrayController, how is the 2D-ness of the matrix fleshed out with a single-dimension NSArray?

1

There are 1 best solutions below

0
On BEST ANSWER

There are some custom-ish views indeed: LIGridControl, MBTableGrid