Re: setStringValue vs. setTitle on NSButtonCell
Re: setStringValue vs. setTitle on NSButtonCell
- Subject: Re: setStringValue vs. setTitle on NSButtonCell
- From: Greg Titus <email@hidden>
- Date: Thu, 24 Jan 2002 20:27:59 -0800
On Thursday, January 24, 2002, at 07:19 PM, Andy wrote:
I have an nsButtonCell (in an NSMatrix) that I'd like to set the title
of directly from an NSAttributedString.
However -setAttributedStringValue: doesn't seem to set the text in the
cell. Similarly -setStringValue: doesn't work. However -setTitle: does
work - but that means I have to drop the attributes from the string.
Basically, I don't understand how the NSCell's
set(Attributed)StringValue interacts with the setTitle on an
NSButtonCell. Is the value meaningful on an NSButtonCell or is it
completely overriden with its title?
Yes, it's completely overridden with its title.
But you can always use -setAttributedTitle:
Hope this helps,
--Greg