当前位置: 动力学知识库 > 问答 > 编程问答 >

osx - How to draw toolbar tabs in OS X?

问题描述:

How do I manually draw those toolbar buttons that act as tabs? I mean the control in the top of this window (see below). I think technically they are radiobuttons placed on a toolbar, or at least they evolved from that.

Is there any HITheme* API to draw them? Or do I have to use CoreUI? I tried CUIDraw with kCUIWidgetButtonSegmentedSCurve, but that just gives an ordinary segmented toolbar button (like on top of a finder window). What I'm looking for is the "settings tab" version:

网友答案:

Use NSToolbar + set of NSToolbarItems with "selectable" property set. This will do the trick.

分享给朋友:
您可能感兴趣的文章:
随机阅读: