• 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: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions


  • Subject: Re: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions
  • From: Jim Correia <email@hidden>
  • Date: Fri, 4 Dec 2009 21:59:28 -0500

On Dec 4, 2009, at 1:52 PM, Grant Erickson wrote:

> I have implemented a custom class that derives from NSTextFieldCell to draw
> status for an associated device (not unlike the network source list in the
> Network System Preferences) overriding only:

[…]

> The issue I am having is determining the correct set of conditionals to use
> to determine when to invert the color of my text strings from
> backgroundColor (when the cell is selected and the associated table has
> focus) to textColor (when the cell is not selected or is selected and does
> not have focus).

In general, the way to do this is to send -interiorBackgroundStyle to yourself, and pick a foreground text color suitable for the background.

- Jim

_______________________________________________

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: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions
      • From: Grant Erickson <email@hidden>
References: 
 >Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions (From: Grant Erickson <email@hidden>)

  • Prev by Date: Re: NSAffineTransform scaleBy not scaling
  • Next by Date: Is it possible to pass an object to a NIB
  • Previous by thread: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions
  • Next by thread: Re: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions
  • Index(es):
    • Date
    • Thread