Re: NSTableView highlight color too dark!
Re: NSTableView highlight color too dark!
- Subject: Re: NSTableView highlight color too dark!
- From: Keith Renz <email@hidden>
- Date: Thu, 22 May 2003 23:28:04 -0400
Tony,
That does absolutely nothing in my NSTableView subclass. My table is
filled with image cells which completely fill each cell. The
highlighting that I'm referring to is selection highlighting. The
current selection highlighting over my images is way too dark, even if
I select a different system highlight color in the System Preferences.
I have manually modified the system highlight color (lightened it up a
bit by blending it with 20% white) and adding an AppleHighlightColor
key and color string in my application domain user defaults -- not an
ideal solution. I remove the key when the app quits and when it starts
up (in case it doesn't quit properly - crashes) and then make the color
calculation and add a new key at startup after removing the old key (if
it exists). It works, but I can't match the nice highlighting color
NSTextView uses. There's got to be a better way.
Keith
-----
On Thursday, May 22, 2003, at 05:38 PM, tony cate wrote:
You can override a method:
- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell
forTableColumn:(NSTableColumn *)tableColumn row:(int)row
{
[cell setDrawsBackground:YES];
if ([cell respondsToSelector:@selector(setBackgroundColor:)]) {
if (row % 2)
[cell setBackgroundColor:[NSColor whiteColor]];
else
[cell setBackgroundColor:[NSColor colorWithCalibratedHue:.6
saturation:.07
brightness:1
alpha:1]];
}
}
On Thursday, May 22, 2003, at 12:36 AM, Keith Renz wrote:
I would like to use a lighter highlight color in my NSTableView
subclass. The regular highlighting is way too dark. How can I use the
highlight color used for NSTextView's text highlighting? I've tried
several approaches but can't seem to get the nice text highlighting
color to work in a table view. I have read the AppKit 10.2 release
notes and understand the highlighting scheme, but table view
highlighting is significantly darker that the Finder's list view, for
example, without violating the scheme.
Thanks,
Keith
_______________________________________________
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.