Re: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions
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