• 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: NSProgressIndicator - hiding/visible
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSProgressIndicator - hiding/visible


  • Subject: Re: NSProgressIndicator - hiding/visible
  • From: Peter Ammon <email@hidden>
  • Date: Thu, 05 Jul 2001 13:52:33 -0700

on 7/5/01 9:49 AM, Kent Glenn at email@hidden wrote:

> I am using a NSProgressIndicator, which is working, but I would like to
> be able to hide it when I'm not using it. I expected to send it a
> message of [ myProgress setVisible:false], or something like this, but I
> don't see anything. I looked at it's super classes, but didn't see
> anything that would help.

A view visibility toggle is something that lots of people have requested.
There's lots of ways to do it; here's mine.

- (void)setProgressBarVisible:(BOOL)isVisible {
NSSize newSize;
if (isVisible) newSize=NSMakeSize(293, 25);
else newSize=NSZeroSize;
[myProgressBar setBoundsSize:newSize];
[[myProgressBar superview] setNeedsDisplayInRect:[myProgressBar frame]];
}

Obviously, replace 293, 25 with the width and height of your progress bar.

-Peter


  • Follow-Ups:
    • Re: NSProgressIndicator - hiding/visible
      • From: Don Messerli <email@hidden>
References: 
 >NSProgressIndicator - hiding/visible (From: Kent Glenn <email@hidden>)

  • Prev by Date: Re: Project Builder & CVS
  • Next by Date: Re: Problem with IBOutlet
  • Previous by thread: Re: NSProgressIndicator - hiding/visible
  • Next by thread: Re: NSProgressIndicator - hiding/visible
  • Index(es):
    • Date
    • Thread