问题描述
我有一个 NSToolbarItem
,它使用类似于Xcode状态视图的视图。它目前没有标签,但我不能找出一种方法绘制到通常会绘制项目标签的区域。我想要的视图扩展到那个区域,正如Xcode状态视图。我知道 NSToolbar
的像素的底部是超出边界,但我看到其他应用程序绘制到标签区域。任何想法?
I have a NSToolbarItem
that uses a view similar to the Xcode status view. It currently has no label, but I can't figure out a way to draw into the area where the item label would normally be drawn. I would like the view to extend into that area just as the Xcode status view does. I know the very bottom portion of pixels of NSToolbar
is out of bounds, but I have seen other applications draw into the label area. Any ideas?
编辑:为了说明,这是我在Xcode中提到的状态视图:
For clarification, this is the status view I'm referring to in Xcode:
我想让我的视图的边界延伸到标签
I want the bounds of my view to extend past the label area of the toolbar just as the view in Xcode does.
推荐答案
Xcode状态视图不是 NSToolbarItem
是在 NSToolbar
中插入的自定义 NSView
。
The Xcode status view is not an NSToolbarItem
is a custom NSView
inserted in the NSToolbar
.
这篇关于是否可以在NSToolbar的标签区域中绘制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!