• 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: sizeToFit without actually changing the size?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sizeToFit without actually changing the size?


  • Subject: Re: sizeToFit without actually changing the size?
  • From: Ricky Sharp <email@hidden>
  • Date: Tue, 20 Nov 2007 17:08:20 -0600


On Nov 20, 2007, at 4:56 PM, John Stiles wrote:

It's a checkbox and I want to know how wide it will need to be if I change its title—not exactly sure how I would do that.

Try using:

NSSize theSize = [[theCheckbox cell] cellSize];

When writing all my custom controls, I implement cellSize in their cells to return a proper value. IB's "size to fit" operation then uses that info. Sounds like you want to do the same thing, but programatically? (I'm assuming this thread is related to the "building checkboxes programatically" thread).

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________

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: sizeToFit without actually changing the size?
      • From: John Stiles <email@hidden>
References: 
 >sizeToFit without actually changing the size? (From: John Stiles <email@hidden>)
 >Re: sizeToFit without actually changing the size? (From: Michael Watson <email@hidden>)
 >Re: sizeToFit without actually changing the size? (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Position of NSStatusItem
  • Next by Date: Re: "Cue Sheet Parser" - Use NSString?
  • Previous by thread: Re: sizeToFit without actually changing the size?
  • Next by thread: Re: sizeToFit without actually changing the size?
  • Index(es):
    • Date
    • Thread