• 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 drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSProgressIndicator drawing


  • Subject: Re: NSProgressIndicator drawing
  • From: Adam Johnson <email@hidden>
  • Date: Thu, 23 Nov 2006 15:19:58 -0500

Here's the code for the NSProgressIndicator creation:

progressIndicator = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect([self bounds].size.width/4,[self bounds].size.height/2-9,[self bounds].size.width/2,18)];
[self addSubview:progressIndicator];
[progressIndicator setStyle:NSProgressIndicatorBarStyle];
[progressIndicator setIndeterminate:NO];
[progressIndicator setMinValue:0];
[progressIndicator setMaxValue:1];
[progressIndicator setAutoresizingMask:(NSViewMinXMargin | NSViewMaxXMargin | NSViewMinYMargin | NSViewMaxYMargin)];
[progressIndicator sizeToFit];
[progressIndicator setDoubleValue:0];
--Adam Johnson
On Nov 23, 2006, at 3:14 PM, Alan Smith wrote:


No idea what the problem is.

In cases like this the thing to do is post the code that creates the
NSProgressIndicator. With that we (the members of this list) should
have no trouble finding the problem.

Cheers, Alan

PS. The code below should create a progress indicator fine, but I
haven't tested it.

NSProgressIndicator *bar = [[NSProgressIndicator alloc] initWithFrame:
NSMakeRect(0, 0, 100, 10)];
[bar setMaxValue: 50];
[bar setDoubleValue: 25];

[[window contentView] addsubview: bar];
[bar release];

--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"When the World realizes that religion really is unnecessary, then it
shall evolve."


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSProgressIndicator drawing
      • From: Scott Stevenson <email@hidden>
    • Re: NSProgressIndicator drawing
      • From: j o a r <email@hidden>
References: 
 >NSProgressIndicator drawing (From: Adam Johnson <email@hidden>)
 >Re: NSProgressIndicator drawing (From: "Alan Smith" <email@hidden>)

  • Prev by Date: Re: NSProgressIndicator drawing
  • Next by Date: Re: NSProgressIndicator drawing
  • Previous by thread: Re: NSProgressIndicator drawing
  • Next by thread: Re: NSProgressIndicator drawing
  • Index(es):
    • Date
    • Thread