On 12/4/09 6:59 PM, Jim Correia wrote: > 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, Thanks for the prompt reply. I forgot to mention one key element. The subclass must support 10.4- and later so I cannot rely on 10.5- and later APIs such as this. Regards, Grant _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
