简体   繁体   English

使用斜体字符串作为NSMenuItem的标题

[英]Using Italic string as NSMenuItem's Title

有什么办法可以用斜体显示NSMenuItem标题

Create an NSAttributedString with NSItalicFontMask applied as a font trait. 创建NSAttributedStringNSItalicFontMask施加作为字体性状。 Set this attributed string to the attributedTitle property of your NSMenuItem . 将此属性字符串设置为NSMenuItemattributedTitle属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM