Clicking token in NSTokenField

↘锁芯ラ 提交于 2020-01-01 09:43:24

问题


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


回答1:


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:).



来源:https://stackoverflow.com/questions/4588599/clicking-token-in-nstokenfield

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!