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

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

  • Follow-Ups:
    • Re: Changing button size programmatically
      • From: "Alan Smith" <email@hidden>
  • Prev by Date: Re: [Q] Characteristics of different Inter Process Communication mechanism on Mac?
  • Next by Date: Multiple One-to-One Core Data relationships & inverse
  • Previous by thread: Re: RS: NSObject members class and isMemberOfClass
  • Next by thread: Re: Changing button size programmatically
  • Index(es):
    • Date
    • Thread