5

NSTokenField works not very well

I insert a NSTokenField into a NSView, when input has enough tokens, it turn into multiline mode, but there there is a problem with it. The top of first line gets cut off 2px and the line spacing between two line becomes too small.

Is there a way to avoid this?

Keith Smiley
  • 61,481
  • 12
  • 97
  • 110
Ron
  • 89
  • 7

1 Answers1

4

NSTokenField is very much closed for customisation so I ended up by implementing my own tokenfield.

I have made it an open source. I have customised it based on my requirements, you can extend it further like the way you want it.

Download the source

I hope it helps.

San
  • 1,796
  • 13
  • 22
  • I have not actually looked at the code yet, but thanks for the help. It appears that Apple in 10.9 is using some private token field with colours on the tags, etc. – Tom Andersen Oct 22 '13 at 21:43