• 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: Drawing a *blue* ProgressIndicator on the Dock app icon in the background / offscreen drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing a *blue* ProgressIndicator on the Dock app icon in the background / offscreen drawing


  • Subject: Re: Drawing a *blue* ProgressIndicator on the Dock app icon in the background / offscreen drawing
  • From: Marc Liyanage <email@hidden>
  • Date: Fri, 6 Feb 2004 22:06:22 +0100

Following up to my own post, maybe it helps someone else who wants to add a progress bar to a dock application icon:

I was able to get it to work by creating a separate NSProgressIndicator programmatically instead of re-using the image from the existing, nib-based progress indicator.

I also had to use an NSWindow subclass whose content view holds the progress indicator view.
The subclass overrides the two methods isKeyWindow and isVisible to always return true.


#import "AlwaysOnWindow.h"


@implementation AlwaysOnWindow


- (BOOL)isKeyWindow {
return YES;
}

- (BOOL)isVisible {
return YES;
}


@end





id mywin = [[AlwaysOnWindow alloc] initWithContentRect:NSMakeRect(0, 0, 128, 20) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
id myIndicator = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0, 0, 128, 20)];
[[mywin contentView] addSubview:myIndicator];
[myIndicator setIndeterminate:NO];


The rest works exactly like in my earlier code snippet.
_______________________________________________
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: 
 >Drawing a *blue* ProgressIndicator on the Dock app icon in the background / offscreen drawing (From: Marc Liyanage <email@hidden>)

  • Prev by Date: Re: Are we still supposed to register Creator code (bundle signature) for OS X app?
  • Next by Date: Question about "JPEG writer requires compacted components"
  • Previous by thread: Drawing a *blue* ProgressIndicator on the Dock app icon in the background / offscreen drawing
  • Next by thread: OpenGL and the Dock
  • Index(es):
    • Date
    • Thread