[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
setSelectedTextAttributes in NSTextView
On Mar 1, 2004, at 1:03 PM, Eric Shepherd wrote:
> When I call this, the change doesn't take place, and the color used
> for highlighted text becomes transparent or something. I can still
> select text, but there's no visible highlighting. It doesn't seem to
> matter which attributes I try to set.
>
> Any idea what I'm doing wrong?
>
> attributes = [NSDictionary
> dictionaryWithObjectsAndKeys:NSUnderlineStyleNone,
> NSUnderlineStyleAttributeName, nil];
> [self setSelectedTextAttributes:attributes];
I'm not sure what you're reporting on, or what you are trying to
accomplish. The selected text underline currently allows the addition
of underlines, but not their removal. There is a known issue that the
change does not itself cause redraw. Try setting
NSBackgroundColorAttributeName.
Douglas Davidson