窗口底部的 NSToolbar
如何将 NSToolbar 放在窗口底部。我需要修改一个程序,该程序在窗口顶部有一个工具栏,现在需要在底部。
How do i put an NSToolbar on the bottom of a window. I need to modify a program that has a toolbar on the top of the window and that needs to go on the bottom now.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
直接回答,如果没有大量的黑客攻击,NSToolbar 就不会合作。
回到更广阔的视野:为什么不使用窗口的底部边缘来放置工具呢?您不会获得 NSToolbar 的用户自定义,但我认为将工具栏的按钮放在窗口底部应该会对您的整体设计方法提出很多问题。 (是的,我知道 iPhoto 等东西,但它仍然本地化到视图,而不是整个窗口,并且它不会“溢出”并且不可自定义。)
In direct answer, NSToolbar won't cooperate without a lot of hackery.
Stepping back to a wider view: why not use the bottom margin of a window to put tools there? You won't get the user customization of NSToolbar but I'd argue putting a toolbar's worth of buttons on the bottom of the window should raise a lot of questions about your overall design approach. (Yes, I'm aware of things like iPhoto, etc. but it's still localized to a view, not the whole window and it doesn't "overflow" and isn't customizable.)