• 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: Changing button size programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing button size programmatically


  • Subject: Re: Changing button size programmatically
  • From: "Alan Smith" <email@hidden>
  • Date: Mon, 10 Sep 2007 08:44:13 -0400

Simon,

Try making a category of NSButton, add a method like this:

- (void)setBoundsRadius:(float)radius
{
   NSRect rect = [self bounds];

   rect.size.width = radius * 2;
   rect.size.height = radius * 2;

   [self setBounds: rect];
}

Peace, Alan

--
My blog: cocoalatte.info

// Things I've said -------------------------
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"When the World realizes that personal beliefs are not something to
argue or fight over, it shall evolve."
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Changing button size programmatically (From: "Simon" <email@hidden>)

  • Prev by Date: Re: Playing mp3s from Cocoa
  • Next by Date: confusing events
  • Previous by thread: Changing button size programmatically
  • Next by thread: Multiple One-to-One Core Data relationships & inverse
  • Index(es):
    • Date
    • Thread