更改窗口标题颜色 [英] Changing window title color

查看:132
本文介绍了更改窗口标题颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改窗口的窗口标题颜色。我想将默认的黑色

How can i change the window title color of a Window. I want to change the default black

颜色更改为其他颜色。

推荐答案

签出: http://www.cocoadev.com/index.pl?NSWindow

我找到了以下信息:


更改标题栏中文本
的颜色?是否有
NSWindowTitleBar?我似乎不能
在谷歌上找到任何关于这一点。 -
JasonTerhorst

How can I change the color of the text in the title bar? Is there an NSWindowTitleBar?? I can't seem to find anything on Google about this. -- JasonTerhorst

NSTitledFrame?(私人)有
_drawTitleStringIn:withColor:您可以覆写这个方法。

NSTitledFrame?(private) has _drawTitleStringIn:withColor: You can override this method.

CocoaMovieTheater?
http://www.zathras.de/ )包括
私人标题的窗口框架
类。 - Afunishi

CocoaMovieTheater? (http://www.zathras.de/) includes private headers of window frame classes. -- Afunishi

请注意,我取消了MovieTheatre?
岁以前,但由于这个页面似乎
导致这么多人到我的网站,
我把我以前做的
自定义窗口颜色分开。查找
it at
http://www.zathras.de /angelweb/sourcecode.htm#UKCustomWindowFrame
。哦,和Afunishi,请不要
直接链接到我的
网站的档案,链接到源代码页
,其中包含每个
的描述。谢谢! - UliKusterer

Note that I took down MovieTheatre? ages ago, but since this page seems to be leading so many people to my site, I put up the class that I used to do custom window colors separately. Find it at http://www.zathras.de/angelweb/sourcecode.htm#UKCustomWindowFrame . Oh, and Afunis please don't directly link into the archives on my web site, link to the sourcecode page that contains a description for each of them. Thanks! -- UliKusterer

但是,强烈建议不要使用或覆盖私有方法。 Apple可能会随时更改这些设置,您的应用程序将无法正常运行。

However, the use of or overriding of private methods is strongly discouraged. Apple might change these at any time and your application will cease to function(!) correctly.

您的其他选项是照顾所有的标题栏,但这并不容易。

Your other option is to take care of all of the title bar drawing yourself, but this isn't easy.

我建议提出一个替代设计,并在 http://bugreport.apple.com 请求该功能,请务必详细解释为什么它对您很重要。

I would suggest coming up with an alternative design and filing a bug report at http://bugreport.apple.com requesting the feature, making sure to explain in great detail why it is important to you.

这篇关于更改窗口标题颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆