• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: getting selected textColor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >getting selected textColor (From: Ruben Smits <email@hidden>)

  • Prev by Date: Re: Accessing NSTimer object added to NSRunLoop object
  • Next by Date: Safely terminating a thread, or the dealloc that doesn't dealloc?
  • Previous by thread: getting selected textColor
  • Next by thread: Creating NSImage with NSData
  • Index(es):
    • Date
    • Thread