• 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: NSTextField Size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField Size


  • Subject: Re: NSTextField Size
  • From: John Stiles <email@hidden>
  • Date: Thu, 20 Dec 2007 12:16:07 -0800

Have you looked at -sizeToFit?
(I don't know how well this will work for multi-line strings… one issue you're up against is that there really isn't one "correct" result. It depends on how wide you're willing to let the string go.)



Ben Robinson wrote:
Hi,

This should be easy, but after hours looking, I need some advice!!

I'm trying to put up an alert in a custom window (NSAlert won't work!) - The alert message could be any length, but for the life of me I can't figure out how to resize the label to the size of the text.

I've set up the window so that when resized the textbox grows with it - so If I could just get the height I need, I could resize the window, but I can't get the height of the text.

Many thanks in advance!!


Ben.

_______________________________________________

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


References: 
 >parsing string data (From: "C Sandeep" <email@hidden>)
 >Re: parsing string data (From: j o a r <email@hidden>)
 >Re: parsing string data (From: "C Sandeep" <email@hidden>)
 >NSTextField Size (From: Ben Robinson <email@hidden>)

  • Prev by Date: NSTextField Size
  • Next by Date: Re: NSTextField Size
  • Previous by thread: NSTextField Size
  • Next by thread: Re: NSTextField Size
  • Index(es):
    • Date
    • Thread