• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is it possible to change the color of selected columns in NSTableView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it possible to change the color of selected columns in NSTableView?


  • Subject: Re: Is it possible to change the color of selected columns in NSTableView?
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Fri, 8 Jan 2010 08:46:36 +0700

On 8 Jan 2010, at 00:35, Andreas K?nner <email@hidden> wrote:
>
> I want to change the default dark blue color for selected columns in NSTableView to a light gray. Is this possible at all?

In order make selected cells light blue I use a subclass of NSTextFieldCell which has only one method:

- (NSColor *)highlightColorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
	NSColor *su = [ super highlightColorWithFrame: cellFrame inView: controlView ];
	if ( su == [ NSColor alternateSelectedControlColor ] )
		su = [ NSColor selectedTextBackgroundColor ];
	return su;
}

This kind of works, but leaves a thin dark blue line on top, and a thick dark blue line at the right of the selected cell.
Does anybody knows how to get rid of these artifacts?

Kind regards,

Gerriet.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Julian date
  • Next by Date: Re: Debugging Services menu in Leopard
  • Previous by thread: Re: CGImageCreate performance
  • Next by thread: NSScroller
  • Index(es):
    • Date
    • Thread