Changing button size programmatically
Changing button size programmatically
- Subject: Changing button size programmatically
- From: "Simon" <email@hidden>
- Date: Fri, 7 Sep 2007 08:36:57 -0400 (EDT)
Hi,I've been trying to create a subclass of NSButton that can have its size changed during runtime.
I'm using a round button (NSCircularBezelStyle), and I need to be able to set the exact radius of the button, which is different for each instance of the button. There doesn't seem to be any way of doing this in either the NSButton class or NSButtonCell class.
I've tried creating my own buttons from scratch using subclasses of NSView, NSImageView and NSCell, but all of these seemed to have their own problems (in NSCell, for instance, when you change the image size (using NSImage's setSize: method) it just seems to change how much of the image is shown; in NSImageView I couldn't work out how to display the button's title; and in NSView my programming is simply not good enough to create a button that looks good).
Can anyone help?
Thanks in advance if you can,
Simon Jones
_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
_______________________________________________
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