弹出 NSColorPanel?
是否可以从 NSColorWell 制作一个 NSColorPanel“弹出”,几乎像一个弹出菜单?
我不喜欢它作为调色板的实现方式,因为有时它与哪个 NSColorWell 关联并不明显。
谢谢!
公吨
Is it possible to make an NSColorPanel 'Pop Up', almost like a popup menu, from the NSColorWell?
I don't like how it's implemented as a palette, as it's sometimes not obvious which NSColorWell it's associated with.
Thanks!
MT
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,您需要创建自己的颜色检查器和颜色井。要使其弹出到现有控件上方,您需要创建一个子窗口并将其附加到现有窗口。调色板控件将位于子窗口中。
但是,我建议您避免这样做。现有的调色板机制经过时间考验,可跨多个应用程序工作。
No, you'd need to create your own color inspector and color well. To get it to pop up above your existing control, you'd need to create a child window and attach it to your existing window. The color palette controls would go in the child window.
However, I'd recommend you avoid doing this. The existing color palette mechanism is time-tested and works across multiple applications.