Themed colors, was NSTableView cell's drawing backgrounds
Themed colors, was NSTableView cell's drawing backgrounds
- Subject: Themed colors, was NSTableView cell's drawing backgrounds
- From: Glenn Howes <email@hidden>
- Date: Sat, 12 Oct 2002 11:08:24 -0500
I decided this striping tables was both cool and functional, so I added
them to my application this morning. Now I'm wondering about the
coloring. Is it a good idea to statically set the striping color to
pale blue? Presumably, at some time in the future, Aqua will get stale
and a new color scheme will be introduced. Under Carbon you can ask the
theme manager for a large number of colors suitable for various
applications. What is the thinking about colors under Cocoa? Is there
something, I should call that would get a passive selection color
(which would happen to be blue (or perhaps light grey) under Aqua, but
might be pink or orange in a future Fire theme?
--glenn
P.S. I took Phillip's code and made it a bit more pluggable:
-(void)awakeFromNib // in your striped NSTableView subclass
{
// hack so certain columns don't draw white over the stripe
// from a suggestion by Phillip Hutchings on the cocoa-dev
mailing list
NSEnumerator* columns = [[self tableColumns] objectEnumerator];
NSTableColumn* aColumn = nil;
while(nil != (aColumn = [columns nextObject]))
{
[aColumn setDataCell: [[[NSCell alloc] initTextCell: @""]
autorelease]];
}
}
On Saturday, October 12, 2002, at 05:16 AM, j o a r wrote:
>
You can fix this by specifying a plain text cell type for the column
>
in question, something like this:
>
>
- (void) awakeFromNib
>
{
>
[tableColumn setDataCell: [[[NSCell alloc] initTextCell: @""]
>
autorelease]];
>
}
>
>
I think, but I'm not sure, that Apple sometimes use some custom cell
>
type for the table view - perhaps for the resizable columns - that
>
always paints a white background before drawing.
>
>
j o a r
>
>
On Saturday, Oct 12, 2002, at 11:51 Europe/Stockholm, Phillip
>
Hutchings wrote:
>
>
> The problem is that, while the first two columns draw the background
>
> normally, the 3 new columns are drawing solid white backgrounds on
>
> the cells, and the blue stripes are showing through where the grid
>
> would be. I've confirmed the problem by setting the table's
>
> background in InterfaceBuilder, the first two columns are solid
>
> colour (in this case peach), but the new 3 look like they have a
>
> peach grid on.
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.