在NSTokenField中单击令牌 [英] Clicking token in NSTokenField

查看:116
本文介绍了在NSTokenField中单击令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您点击NSTokenField中的令牌时,是否可以获得一个事件?

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

推荐答案

看到这些令牌 NSTokenFieldCell s)继承自 NSCell 类,理论上,是的,你可以让他们发送一个事件一个动作和一个目标( -setAction: -setTarget:,如果你想给予令牌菜单当按下时,使用 -setMenu:)。

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

这篇关于在NSTokenField中单击令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆