RE: How resize a button or label to fit its content (at runtime)?
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: "Jon C. Munson II" <email@hidden>
- Date: Wed, 11 Feb 2009 09:40:50 -0500
- Organization: JTA Enterprises LLC
Yes, keywords will getcha all the time. I run into that too - "what is the
right terminology to find *this*." One other hint, when a keyword search
doesn't return something of value, try looking at the class of interest and
follow up the chain until you find, or not, what you seek. Sure, it is
tedious, but often can resolve things after a bit of effort.
Peace, Love, and Light,
/s/ Jon C. Munson II
> -----Original Message-----
> From: cocoa-dev-bounces+jmunson=email@hidden [mailto:cocoa-dev-
> bounces+jmunson=email@hidden] On Behalf Of Oleg Krupnov
> Sent: Wednesday, February 11, 2009 9:39 AM
> To: I. Savant
> Cc: Cocoa-Dev List
> Subject: Re: How resize a button or label to fit its content (at runtime)?
>
> Thanks for answering! I did search the docs and cocoa-dev, but found
> nothing because I used wrong keywords like "autosize", "size to
> content", whereas it should have been "size to fit". Sorry for that!
>
>
> On Wed, Feb 11, 2009 at 4:32 PM, I. Savant <email@hidden>
> wrote:
> > 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
_______________________________________________
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