• 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: How to change highlight colour on NSTableView row
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to change highlight colour on NSTableView row


  • Subject: Re: How to change highlight colour on NSTableView row
  • From: "email@hidden" <email@hidden>
  • Date: Mon, 21 Oct 2013 17:23:53 +0100

On 21 Oct 2013, at 16:19, Darren Wheatley <email@hidden> wrote:

> Hi,
>
> I have a custom subclass of NSTableView in my app.
>
> Can anyone suggest a method that will allow me to set a custom highlight colour on on a row when the user clicks on it?
>
> I've Googled for a solution, but haven't been able to find anything that works.
>
>
For cell based tables try:

- (void)highlightSelectionInClipRect:(NSRect)clipRect

There is a sample implementation at http://stackoverflow.com/questions/7038709/change-highlighting-color-in-nstableview-in-cocoa.
You may need to set selectionHighlightStyle to NSTableViewSelectionHighlightStyleSourceList

Note: This method should not be subclassed or overridden for a view-base table view. Instead, row drawing customization should be done by subclassing NSTableRowView.

Jonathan


_______________________________________________

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


  • Follow-Ups:
    • Re: How to change highlight colour on NSTableView row
      • From: Darren Wheatley <email@hidden>
    • Re: How to change highlight colour on NSTableView row
      • From: Darren Wheatley <email@hidden>
References: 
 >How to change highlight colour on NSTableView row (From: Darren Wheatley <email@hidden>)

  • Prev by Date: How to change highlight colour on NSTableView row
  • Next by Date: Re: NSDocument and KVO compliance
  • Previous by thread: How to change highlight colour on NSTableView row
  • Next by thread: Re: How to change highlight colour on NSTableView row
  • Index(es):
    • Date
    • Thread