• 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
NSTextField(?) Dynamic size based on content
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextField(?) Dynamic size based on content


  • Subject: NSTextField(?) Dynamic size based on content
  • From: otherguy <email@hidden>
  • Date: Fri, 27 Feb 2004 00:56:38 -0700

Hi everyone!

I need to do something similar to what Apple's done with Address Book and the fields while they're in edit mode. Specifically how the fields dynamically grow as you type into them. I was trying to figure out how to do this with a NSTextField, but I cannot, for the life of me, find any information on how to calculate the width in pixels of a formatted string of text.

Would someone be kind enough to point me in the right direction? If I should be using a NSTextView instead, is there a way to set the border, or do I have to create a subclass or composite class? If I can do it with a NSTextField, does anyone know how to calculate the proper width?

I've been plowing through several cocoa books on O'Reilly's Safari as well as the Apple Documentation. Any recommendations for additional resources are extremely welcome.

Thanks a ton!
-Cameron Wilhelm
email@hidden

P.S. Sorry if it's a bit of basic question - I'm still learning. ;)
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NSTextField(?) Dynamic size based on content
      • From: j o a r <email@hidden>
  • Prev by Date: file types for syntax highlighting
  • Next by Date: Re: Breakpoints not working
  • Previous by thread: Re: file types for syntax highlighting
  • Next by thread: Re: NSTextField(?) Dynamic size based on content
  • Index(es):
    • Date
    • Thread