dmitrynikolaev
dmitrynikolaev

Reputation: 9132

NSTextView and text baloons (like in Mail app)

I'm wondering how create such baloons in NSTextView, as in send mail window. I found one way of doing this, but I want user delete all baloon in one click (or transfer it to another location) ?

Seems that it NSTextAttachment, but I not sure really.

Thank you!

enter image description here

Upvotes: 0

Views: 287

Answers (1)

iii
iii

Reputation: 1614

For a simple single-line field like in the screenshot, that would be an NSTokenField.

If you want to do it in a big NSTextView, like Xcode autocomplete, then you'll have to create it from scratch. (Probably with NSTextAttachment + NSAttributedString)

Upvotes: 5

Related Questions