Re: NSProgressIndicator - hiding/visible
Re: NSProgressIndicator - hiding/visible
- Subject: Re: NSProgressIndicator - hiding/visible
- From: Don Messerli <email@hidden>
- Date: Thu, 05 Jul 2001 19:41:18 -0400
Peter,
I tried this with an NSSlider and when I make it visible again the knob (or
whatever you call it) on the slider is drawn a bit too high on the screen.
Don
On 7/5/01 4:52 PM, "Peter Ammon" <email@hidden> wrote:
>
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
>
_______________________________________________
>
cocoa-dev mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev