下拉窗口编辑 Cocoa 弹出菜单项

发布于 2024-10-19 20:34:13 字数 334 浏览 8 评论 0原文

我对 Cocoa 比较陌生,我想实现从弹出菜单中添加或删除项目的功能,就像 OS X 系统偏好设置/网络位置弹出窗口的工作方式一样。选择“编辑位置...”选项会弹出一个窗口,提供在现有位置列表中添加或删除的功能。我对这种方式的兴趣在于遵守相关的人机界面指南以及动态更改菜单内容的方法。 (我对“后台”编码方面没有真正的问题,用户界面是我现阶段的主要问题。)

这是标准的 IB 视图吗?

从表面上看,我看不出有什么合适的地方,但也许这只是我的经验不足。我假设,因为这不是一种不常见的要求,所以任务应该非常简单,Apple 或某人甚至会有一个相关的代码示例来展示如何定义这样的窗口。

有人能指出我正确的方向吗?

I'm relatively new to Cocoa and I would like to implement the ability to add or delete items from a pop-up menu in the same way that the OS X System Preferences/Network Location pop-up works. Selecting the 'Edit Locations...' option rolls down a window that provides the ability to add to, or delete from the existing Location list. My interest in doing things this way is as much about conforming to the relevant Human Interface Guidelines as having a way to dynamically change the menu content. (I have no real problem with the 'background' coding side of things, it's the user interface that's my primary issue at this stage.)

Is this a standard IB View?

On the surface, I can't see anything appropriate, but maybe that's just my inexperience. I'm assuming that, because this is not an uncommon sort of requirement, the task should be pretty straightforward and that Apple, or someone, would even have a relevant code sample to show how to define such a window.

Can anyone point me in the right direction?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风为裳 2024-10-26 20:34:13

抱歉回复晚了。我找到了这个教程: http://cocoadevcentral.com/articles/000014.php

Sorry for the late answer. I found this tutorial: http://cocoadevcentral.com/articles/000014.php

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文