• 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: Programatically adding small checkboxes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programatically adding small checkboxes


  • Subject: Re: Programatically adding small checkboxes
  • From: Todd Yandell <email@hidden>
  • Date: Mon, 2 May 2005 21:42:16 -0500

Hi,

You could do either of the two things you mentioned.

If you want to change the size of an NSButton control, try something along these lines:
[[yourButton cell] setControlSize:NSSmallControlSize];

If you want to add an NSCell subclass to an NSView, then you will need a "host" view. NSCell doesn't provide any of the NSView methods on it's own, instead it requires another view (like NSButton, for instance) to provide all of the NSView-compatible methods for it. This helps keep NSCell instances more light-weight so they can be used over and over without all of the overhead of an NSView. So, you can either add it directly to an instance of NSControl/NSButton (setCell:), or add it to an NSMatrix or another similar class.

Hope that helps!
Todd Yandell
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Programatically adding small checkboxes
      • From: Ken Tozier <email@hidden>
References: 
 >Programatically adding small checkboxes (From: Ken Tozier <email@hidden>)

  • Prev by Date: Detecting the Option key on selecting a menuitem
  • Next by Date: Re: Detecting the Option key on selecting a menuitem
  • Previous by thread: Programatically adding small checkboxes
  • Next by thread: Re: Programatically adding small checkboxes
  • Index(es):
    • Date
    • Thread