• 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: Attributed strings in NSTableViews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Attributed strings in NSTableViews


  • Subject: Re: Attributed strings in NSTableViews
  • From: Kyle Sluder <email@hidden>
  • Date: Sun, 30 Jun 2013 13:04:51 -0700

Please do file radars about this. Apple only knows how many people are affected if they let them know.

--Kyle Sluder

On Jun 30, 2013, at 1:01 PM, Peter Hudson <email@hidden> wrote:

> Andy
>
> Thanks for this, It helps me fix another problem I have.
>
> Peter
>
>
> On 30 Jun 2013, at 20:48, Andy Lee <email@hidden> wrote:
>
>>
>> On Jun 30, 2013, at 2:44 PM, Kyle Sluder <email@hidden> wrote:
>>
>>> On Jun 30, 2013, at 6:04 AM, Peter Hudson <email@hidden> wrote:
>>>
>>>>
>>>> I then append a second attributed string to the first - with very similar attributes as the first.
>>>> After this, when the row is selected, the system no longer reverses out the text color as it did previously.
>>>
>>> Text drawing will only reverse the colors of text if the entire string is drawn in NSControlTextColor. (I've filed a Radar on this opaque, undocumented, uncustomizable behavior.)
>>
>> I ran into similar stubbornness when trying to use a custom color for the title of an NSButton when it is disabled.  My workaround, based on an answer I found on StackOverflow, was to override the cell's drawTitle:withFrame:inView: method.
>>
>> .m: <https://github.com/aglee/appkido/blob/master/src/CustomViews/AKButtonCell.m>
>>
>> .h: <https://github.com/aglee/appkido/blob/master/src/CustomViews/AKButtonCell.h>
>>
>> Maybe the same technique would work for you.  You'd have to figure out how to reverse the color yourself, but at least you'd have complete control over the string's appearance.
>>
>> --Andy
>

_______________________________________________

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


References: 
 >Attributed strings in NSTableViews (From: Peter Hudson <email@hidden>)
 >Re: Attributed strings in NSTableViews (From: Kyle Sluder <email@hidden>)
 >Re: Attributed strings in NSTableViews (From: Andy Lee <email@hidden>)
 >Re: Attributed strings in NSTableViews (From: Peter Hudson <email@hidden>)

  • Prev by Date: Re: Attributed strings in NSTableViews
  • Next by Date: Re: iterative process building huge stack
  • Previous by thread: Re: Attributed strings in NSTableViews
  • Next by thread: Re: Cocoa-dev Digest, Vol 10, Issue 400
  • Index(es):
    • Date
    • Thread