Tom Nys
Tom Nys

Reputation: 579

Clicking token in NSTokenField

Is it possible to get an event when you click on a token in a NSTokenField?

Upvotes: 8

Views: 1126

Answers (1)

Itai Ferber
Itai Ferber

Reputation: 29833

Seeing as those tokens (NSTokenFieldCells) inherit from the NSCell class, in theory, yes, you can have them send an event by giving them an action and a target (-setAction: and -setTarget: respectively, and if you want to give the tokens menus when pressed, use -setMenu:).

Upvotes: 4

Related Questions