• 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
Making an automatic vertically expanding NSTokenField?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Making an automatic vertically expanding NSTokenField?


  • Subject: Making an automatic vertically expanding NSTokenField?
  • From: Nick Zitzmann <email@hidden>
  • Date: Wed, 19 Dec 2012 18:41:04 -0700

I've been searching around, and have run out of options. Has anyone here ever made an NSTokenField that vertically expands & collapses as text is entered into it? If so, then how did you do that?

I found this - <http://joshua.nozzi.name/source/jlnautosizingtokenfield/> - which calls -sizeToFit after the text is changed. The problem is, -sizeToFit appears to always expand the token field horizontally, and I need it to expand vertically.

I also found some samples on the CocoaDev wiki that suggested using the -usedRectForTextContainer: method of the token field's field editor. But whenever I call it, it always returns zero size even though there are tokens in the field.

Nick Zitzmann
<http://www.chronosnet.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: Making an automatic vertically expanding NSTokenField?
      • From: Kyle Sluder <email@hidden>
    • Re: Making an automatic vertically expanding NSTokenField?
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: iOS - needs-shine app pList setting being ignored on devices.
  • Next by Date: "New" busy cursor in the Finder
  • Previous by thread: Auto Layout, Localization and Superview Size
  • Next by thread: Re: Making an automatic vertically expanding NSTokenField?
  • Index(es):
    • Date
    • Thread