Binding table view custom cell background colour
Binding table view custom cell background colour
- Subject: Binding table view custom cell background colour
- From: Andrew Merenbach <email@hidden>
- Date: Fri, 20 Oct 2006 10:16:57 -0700
Hi, everyone. I'm making a program (a periodic table, to be exact)
that requires coloured cells (coloured button cells for the table
itself and coloured plain cells for the legend). I have made a
subclass of NSButtonCell (which I've placed inside an NSMatrix
subclass) for the periodic table itself, and the legend I have
decided to put into an NSTableView. The matrix works; the legend,
however, is proving troublesome.
The problem is this: I want to avoid really messy code, if possible,
and stick with an MVC paradigm, if possible. I'm having trouble
wrapping my head around what I would have to do here, so I'm
submitting this question to the list in the hopes that anyone else
who has a similar problem may also be helped. I am sure that an
NSValueTransformer will be used, but beyond that I'm still a bit
clueless. To make the question more abstract:
If one wants to make a background colour appear for an NSCell in a
table view, but make it unique for each NSCell (so that the first row
is red, the second is blue, the third is green, et cetera), what is
the best way (with an NSArrayController) to do this?
Cheers,
Andrew
_______________________________________________
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