• 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: NSColor (alpha enabling and setting color in color panel)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSColor (alpha enabling and setting color in color panel)


  • Subject: Re: NSColor (alpha enabling and setting color in color panel)
  • From: Bruce Veazie <email@hidden>
  • Date: Thu, 2 Jan 2003 00:57:34 -0500

You can set the color of both the colorwell (NSColorWell) and the colorpanel (NSColorPanel) with "setColor:(NSColor *)colorToSet". Both use the same method.

You can get the color of the selected text from [selectedText textColor];

So:

[yourColorWellOrColorPanel setColor:[selectedText textColor]];

If the colorwell is active (the bezel is highlighted) and the colorpanel is displayed, just set the color of the colorwell. The panel will sync its color to it automatically.

Is that what you were looking for?

On Thursday, January 2, 2003, at 12:35 AM, email@hidden wrote:

On Wednesday, January 1, 2003, at 05:25 PM, Aaron Boothello wrote:

1. How do you enable the Alpha value slider in the Color panel ?

From NSColorPanel.h:

- (void)setShowsAlpha:(BOOL)flag;
- (BOOL)showsAlpha;

2. How do you set the color of the colorwell/color panel ?
example: i select a different colored text in my document, with the
color panel open. i would like the color of the text to be selected in
the color panel.

Not sure on this one...

-Ken

Bruce J. Veazie
email@hidden
http://veazie.org
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSColor (alpha enabling and setting color in color panel)
      • From: Aaron Boothello <email@hidden>
    • Re: NSColor (alpha enabling and setting color in color panel)
      • From: Aaron Boothello <email@hidden>
  • Prev by Date: Re: select Button
  • Next by Date: subclassing NSTabViewItem
  • Previous by thread: Re: NSColor (alpha enabling and setting color in color panel)
  • Next by thread: Re: NSColor (alpha enabling and setting color in color panel)
  • Index(es):
    • Date
    • Thread