• 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: How resize a button or label to fit its content (at runtime)?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How resize a button or label to fit its content (at runtime)?


  • Subject: Re: How resize a button or label to fit its content (at runtime)?
  • From: "I. Savant" <email@hidden>
  • Date: Wed, 11 Feb 2009 09:32:20 -0500

On Wed, Feb 11, 2009 at 9:20 AM, Oleg Krupnov <email@hidden> wrote:
> Is there a way to programmatically resize a button or text field to
> fit its contents exactly? I can do it in the Interface Builder, but I
> need to do it at runtime. Thanks!

  Have you tried searching the documentation? The -[NSControl
sizeToFit] method doesn't strike me as too difficult to find in a
keyword search ... Since NSButton is a subclass of NSControl, that
looks like a good place to start, no?

--
I.S.
_______________________________________________

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: How resize a button or label to fit its content (at runtime)?
      • From: Oleg Krupnov <email@hidden>
References: 
 >How resize a button or label to fit its content (at runtime)? (From: Oleg Krupnov <email@hidden>)

  • Prev by Date: How resize a button or label to fit its content (at runtime)?
  • Next by Date: Re: How resize a button or label to fit its content (at runtime)?
  • Previous by thread: How resize a button or label to fit its content (at runtime)?
  • Next by thread: Re: How resize a button or label to fit its content (at runtime)?
  • Index(es):
    • Date
    • Thread