当段被点击时,显示NS​​SegmentedControl菜单,尽管已设置操作 [英] Show NSSegmentedControl menu when segment clicked, despite having set action

查看:204
本文介绍了当段被点击时,显示NS​​SegmentedControl菜单,尽管已设置操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是基于另一个问题。而不是重复一堆东西,我希望可以,我引用你的另一个问题,而不是:

My question is based on another question. Instead of repeating a bunch of stuff, I hope it's okay that I refer you to that other question instead:

在细分受众群点击时显示NSSegmentedControl菜单

我的问题是:[self showGearMenu]中的代码如何看起来像,即如何实际使用popUpContextMenu:withEvent:forView方法来完成另一个问题的海报。

My question is: How would the code within [self showGearMenu] look like, i.e. how would one actually use the popUpContextMenu:withEvent:forView method to accomplish what the poster of the other question wants?

我问,因为似乎问题已经解决了海报,但他从来没有与我们分享他是如何实际弹出菜单:)

I ask because it seems that the question was resolved for the poster, but he never shared with us how he actually popped up the menu :)

推荐答案

我在几个月前有这个问题,我问Cocoa-dev:

I had this question a couple months ago, which I asked on Cocoa-dev:

http://www.cocoabuilder.com/archive/cocoa/275771 -trouble-with-nssegmentedcontrol.html#275771

通过电子邮件发送给我的代码非常好,但它不是我的代码,所以我要去发布。但如果您愿意,请与Araelium Group的Seth联络 AGNSSegmentedControl http://www.araelium.com/

The code that was emailed to me off-list works great, but it's not my code, so I'm going to post it. However if you'd like it, contact Seth at Araelium Group about AGNSSegmentedControl: http://www.araelium.com/

这篇关于当段被点击时,显示NS​​SegmentedControl菜单,尽管已设置操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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