Re: changing colors in NSTableView
Re: changing colors in NSTableView
- Subject: Re: changing colors in NSTableView
- From: Andreas Mayer <email@hidden>
- Date: Fri, 1 Nov 2002 15:23:09 +0100
Am Donnerstag, 31.10.02 um 21:23 Uhr schrieb Dave Sopchak:
Does anyone know a way of changing the text color in an NSTableView?
As it is, setting the background color in IB does weird things anyway.
Setting the background color works fine for me.
You will want to make sure that the background color of your cells is
transparent.
In my case I figured out that IB used an opaque background for the
cell(s) of the first column but made it transparent for any subsequent
columns; so I just used the cell of the second column for the first
too. Here's some code:
// use striped window background
[shortcutTableView setBackgroundColor:[NSColor windowBackgroundColor]];
// use transprent background for cells
[[shortcutTableView tableColumnWithIdentifier:@"Title"]
setDataCell:[[shortcutTableView tableColumnWithIdentifier:@"Key"]
dataCell]];
bye. Andreas.
_______________________________________________
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.