• 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: Changing the Color of NSProgressIndicator with CGContextSetBlendMode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing the Color of NSProgressIndicator with CGContextSetBlendMode


  • Subject: Re: Changing the Color of NSProgressIndicator with CGContextSetBlendMode
  • From: Andrew Merenbach <email@hidden>
  • Date: Tue, 20 Feb 2007 16:39:32 -0800

Hi, Rob. Although the method -addSubview:position:relativeTo: exists, the current state of Mac OS X Cocoa is such that overlapping views are, unfortunately, not supported. Someone will likely respond with a relevant quote from the documentation that might have missed your research. You will likely have to find a different way to color your progress indicator, although I do not have any ideas as to what that would be.

Cheers,
	Andrew

On Feb 20, 2007, at 4:15 PM, Robert Kukuchka wrote:

Hello,
I'm testing out an idea to change the color of NSProgressIndicator from it's default state, and I'm getting some weird issues. Any help would be greatly appreciated.


Here is a simplified version of what I'm doing
1) adding an NSProgressIndicator to my window
2) setControlTint:NSGraphiteControlTint
2) adding a view on top (using addSubview:positioned:relativeTo:)
3) Within the drawRect of my view I do the following:
CGContextSetBlendMode((CGContextRef)[[NSGraphicsContext currentContext] graphicsPort], kCGBlendModeColor);
[[[NSColor magentaColor] colorWithAlphaComponent:1] set];
[NSBezierPath fillRect:rect];


Results:
I'm getting some "flickering" during progress advancement. I make sure to call [myView setNeedsDisplay:YES]; anytime I manipulate the progressBar (such as incrementBy:), but it still occasionally seems that the NSProgressIndicator is not respecting the Z-Ordering, and I only see the progress as the Graphite.


Oddly enough if I setIndeterminate to YES, it blends perfectly, only using a determinate option results in the flickering.

Any ideas?

Cheers
Rob

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
40ucla.edu


This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Changing the Color of NSProgressIndicator with CGContextSetBlendMode
      • From: Mike Abdullah <email@hidden>
References: 
 >Changing the Color of NSProgressIndicator with CGContextSetBlendMode (From: Robert Kukuchka <email@hidden>)

  • Prev by Date: Changing the Color of NSProgressIndicator with CGContextSetBlendMode
  • Next by Date: Re: class variables
  • Previous by thread: Changing the Color of NSProgressIndicator with CGContextSetBlendMode
  • Next by thread: Re: Changing the Color of NSProgressIndicator with CGContextSetBlendMode
  • Index(es):
    • Date
    • Thread