• 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
Progress bar on front NSPanel is grey not blue??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Progress bar on front NSPanel is grey not blue??


  • Subject: Progress bar on front NSPanel is grey not blue??
  • From: "Theodore H. Smith" <email@hidden>
  • Date: Wed, 12 Apr 2006 20:19:07 +0100

I have some code that I want to update with a progress bar. It's in a loop, so we don't go back to the main event loop while the busy loop runs.

I start up a window (an NSPanel actually) to display the progress bar like this:

	NSWindow* w = [self window];
	[w center];
	[w update];
	[w makeKeyAndOrderFront:0];


There is a progress bar on the window, which I update like this:

	[p setDoubleValue: [p maxValue] * Fraction];
	[p display];

This way, the progress bar will visually update despite that I am in a hot loop.

But there is a problem! the progress bar is greyed out, as if the window is not yet the front window. I am guessing, that this occurs because user event loop has not yet been returned to, and the thing that turns grey controls to blue, occurs during user event time.

So how to turn it blue?

Also, I'd like this front NSPanel to not allow other windows to become in front of it. It's silly to have a progress bar during a hot loop which doesn't even show you the progress because it's hidden by other windows from within it's own app! How to acheive this?


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Progress bar on front NSPanel is grey not blue??
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: NSSecureTextFieldCell setEchosBullets
  • Next by Date: RE: Getting text caret location in screen coordinate
  • Previous by thread: Re: NSSecureTextFieldCell setEchosBullets
  • Next by thread: Re: Progress bar on front NSPanel is grey not blue??
  • Index(es):
    • Date
    • Thread