Re: Highlighting chars in an NSTextField?
Re: Highlighting chars in an NSTextField?
- Subject: Re: Highlighting chars in an NSTextField?
- From: Jens Alfke <email@hidden>
- Date: Thu, 26 Jan 2012 14:19:16 -0800
On Jan 26, 2012, at 11:31 AM, Clark Williams wrote:
> Is this the wrong approach?
Yeah. Cell highlighting is for buttons and button-like controls to change visual state when pressed. It has no effect on text cells and it's definitely not for selecting text.
What I would do is create an NSAttributedString that has a custom background color for the character range you want highlighted, then set that as the text field's attributedStringValue.
—Jens
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden