Re: NSTextView and changing the selected text's color

2008-06-12 Thread Mattias Arrelid
On Thu, Jun 12, 2008 at 5:40 PM, Douglas Davidson <[EMAIL PROTECTED]> wrote: > > On Jun 12, 2008, at 2:47 AM, Mattias Arrelid wrote: > >> It turns out that if you set the NSForegroundColorAttributeName of the >> attributed string in NSTextView's text storage, the call to >> setSelectedTextAttribute

Re: NSTextView and changing the selected text's color

2008-06-12 Thread Douglas Davidson
On Jun 12, 2008, at 2:47 AM, Mattias Arrelid wrote: It turns out that if you set the NSForegroundColorAttributeName of the attributed string in NSTextView's text storage, the call to setSelectedTextAttributes: doesn't have any effect when called as described below: File a bug and we'll look i

Re: NSTextView and changing the selected text's color

2008-06-12 Thread Graham Cox
Definitely sounds like a bug - file it anyway, they can only say "behaves as expected" (and probably will... ;-) I would expect that if I set my foreground text to some pale colour, I could set a different colour for selected text so it has contrast with the background selection colour, not

Re: NSTextView and changing the selected text's color

2008-06-12 Thread Mattias Arrelid
On Thu, Jun 12, 2008 at 11:14 AM, Mattias Arrelid <[EMAIL PROTECTED]> wrote: > On Wed, Jun 11, 2008 at 6:15 PM, Mattias Arrelid <[EMAIL PROTECTED]> wrote: >> Hi Douglas, >> >> On Wed, Jun 11, 2008 at 5:30 PM, Douglas Davidson <[EMAIL PROTECTED]> wrote: >>> >>> On Jun 11, 2008, at 3:24 AM, Mattias A

Re: NSTextView and changing the selected text's color

2008-06-12 Thread Mattias Arrelid
On Wed, Jun 11, 2008 at 6:15 PM, Mattias Arrelid <[EMAIL PROTECTED]> wrote: > Hi Douglas, > > On Wed, Jun 11, 2008 at 5:30 PM, Douglas Davidson <[EMAIL PROTECTED]> wrote: >> >> On Jun 11, 2008, at 3:24 AM, Mattias Arrelid wrote: >> >>> Haven't anyone stumbled upon something similar, or a solution t

Re: NSTextView and changing the selected text's color

2008-06-11 Thread Mattias Arrelid
Hi Douglas, On Wed, Jun 11, 2008 at 5:30 PM, Douglas Davidson <[EMAIL PROTECTED]> wrote: > > On Jun 11, 2008, at 3:24 AM, Mattias Arrelid wrote: > >> Haven't anyone stumbled upon something similar, or a solution to this? > > I believe it was answered. You don't want to use setMarkedTextAttributes

Re: NSTextView and changing the selected text's color

2008-06-11 Thread Douglas Davidson
On Jun 11, 2008, at 3:24 AM, Mattias Arrelid wrote: Haven't anyone stumbled upon something similar, or a solution to this? I believe it was answered. You don't want to use setMarkedTextAttributes:, because marked text is the uncommitted text you see while using an input method. You can

Fwd: NSTextView and changing the selected text's color

2008-06-11 Thread Mattias Arrelid
Haven't anyone stumbled upon something similar, or a solution to this? Best regards Mattias -- Forwarded message -- From: Mattias Arrelid <[EMAIL PROTECTED]> Date: Fri, May 30, 2008 at 1:25 PM Subject: NSTextView and changing the selected text's col

Re: NSTextView and changing the selected text's color

2008-05-30 Thread Gary L. Wade
As for the color choices to use when drawing selected color text, what I've found most readable to my users is to continue using the selection color as chosen by the user but to draw the text shadowed as the Finder does it, with the text being white and the shadow color being the color of the t

Re: NSTextView and changing the selected text's color

2008-05-30 Thread Ross Carter
Instead of NSTextView setMarkedTextAttributes:, I think you want to look at setSelectedTextAttributes:. "Marked text" refers to text input that is not final. When you type option-e, NSTextView displays an accent glyph with a yellow background. That's marked text. When you type a letter, the

NSTextView and changing the selected text's color

2008-05-30 Thread Mattias Arrelid
Hi everyone, We have a subclass of NSTextView (SPTextView). A couple of these have some text with [NSColor grayColor] set as the NSForegroundColorAttributeName. It looks good, but when the user starts selecting text things go bad™. Since grey on light blue (the default system selection color) isn