Re: Changing button size programmatically
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