zzyzy
zzyzy

Reputation: 983

NSMatrix for spreadsheet implementation?

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?

Upvotes: 1

Views: 115

Answers (1)

Damiaan Dufaux
Damiaan Dufaux

Reputation: 4785

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

Upvotes: 0

Related Questions