views:

46

answers:

1

I try to build an Input which is able to show one or more Token at the beginning of line.
You can see an example what I'm trying to receive in the image below. (screenshot shows google-macsearch)

http://www.freeimagehosting.net/uploads/4a268855a0.jpg

Cocoa provides the NSToken class, but I like to do it by myself and custom, but I don't know what or how to do.

I tempt to draw the Token. This works fine, but now its on my View and without any functionality. I expect i shout place it somehow into the TextView. I hope you will give me a hint.

Salut

+1  A: 

This is what the NSTokenField class is for. Basically, the token field asks its delegate for information about its tokens, and then draws the tokens itself.

Dave DeLong