NSTextField-黑色背景上的白色文本,但黑色光标 [英] NSTextField - White text on black background, but black cursor

查看:395
本文介绍了NSTextField-黑色背景上的白色文本,但黑色光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置了一个NSTextField,其文本颜色为白色,背景颜色为(尽管未呈现背景颜色,但黑色,因此其为透明的).全部在Interface Builder中.

I've setup an NSTextField with text color as white, and the background color as (black despite not rendering the background color, so its transparent). All in Interface Builder.

我遇到的问题是光标是黑色的,几乎看不见. 光标不代表文本颜色吗?关于如何解决此问题的任何想法?

The problem I am having is the cursor is black, and hardly visible. Does the cursor not represent the text color? Any ideas how I can fix this?

否则,NSTextField似乎无法对其进行编辑.

Otherwise, the NSTextField looks like it cannot be edited.

推荐答案

您最好的选择是使用NSTextView和- (void)setInsertionPointColor:(NSColor *)color.

Your best bet is probably to use NSTextView and - (void)setInsertionPointColor:(NSColor *)color.

这篇关于NSTextField-黑色背景上的白色文本,但黑色光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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