开发者

Cocoa - Custom appearance of NSStatusItem in menu bar

开发者 https://www.devze.com 2023-02-09 09:15 出处:网络
It is easy to set the title and length of an NSStatusItem. Is is possible to change the appearance of the NSStatusItem开发者_Python百科 entirely, and replace it with a custom view?

It is easy to set the title and length of an NSStatusItem. Is is possible to change the appearance of the NSStatusItem开发者_Python百科 entirely, and replace it with a custom view?

For example, if I want my NSStatusItem to be a whole row of icons surrounded by a border, rather than just a single icon, and each icon can be separately clicked. Is this possible?


Got it. I can use NSStatusItem's setView: method to completely customize the appearance of the NSStatusItem.

An example of this is here.

0

精彩评论

暂无评论...
验证码 换一张
取 消