On Nov 3, 2008, at 7:39 PM, Rashmi Vyshnavi wrote:

Hi all,

I am setting a custom view containing a label and spin style progress
indicator. I want the progress indicator to spin when the menu is popped up (similar to AirPort Menu). The progess indicator does not spin though I call startAnimation on it. When I change the style to bar the progress indicator shows progress. Does any one know how get NSProgressIndicator (Spin style)
to spin in Menu..

Thanks,
Rashmi

Setup a delegate to the menu and implement menuWillOpen: then use performSelector:... to start the animation after the current run loop. It seems to me like the indeterminate progress indicator only accepts startAnimation: after it's been drawn.

- (void)menuWillOpen:(NSMenu *)menu
{
        [progressIndicator performSelector:@selector(startAnimation:)
                                                        withObject:self
                                                        afterDelay:0.0
                                                           inModes:[NSArray 
arrayWithObject:NSEventTrackingRunLoopMode]];
}

--Nathan


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to