Re: getting selected textColor
Re: getting selected textColor
- Subject: Re: getting selected textColor
- From: Satoshi Matsumoto <email@hidden>
- Date: Mon, 15 Mar 2004 21:51:49 +0900
Hi Ruben,
on 04.3.15 7:13 PM, Ruben Smits at email@hidden wrote:
>
My questions:
>
- Can I use [NSColor selectedTextColor] to set the correct color in the
>
colorPanel?
>
- How do I prevent that color in my text is set with a call of
>
[NSColorPanel setColor]
[NSColor selectedTextColor] is the system color of the selected text.
If you wish to get the text foreground color of the selected text:
NSColor *foreColor =[[self textStorage]
attribute:NSForegroundColorAttributeName atIndex:[self
selectedRange].location effectiveRange:&range];
Satoshi
-----------------------------------------------------
Satoshi Matsumoto <email@hidden>
816-5 Odake, Odawara, Kanagawa, Japan 256-0802
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.